Robert M. Drew (appellant) was convicted after a jury trial of one count of possession of firearms by a convicted felon, in violation of Code § 18.2-308.2. On appeal, he alleges the trial court erred in denying his motion to dismiss the indictment after it was amended. Appellant argues the Commonwealth had no authority to amend the indictment because his presence in court was pursuant to the Agreement on Detainers, Code §§ 53.1-210 to -215. We affirm the conviction.
Appellant was in federal custody, serving a sentence for a federal conviction, when he requested disposition, pursuant to the Agreement on Detainers (the Agreement), of six indictments outstanding in York County. He was transferred to York County, pursuant to his request, for trial on six indictments of possession of a firearm by a convicted felon, each alleging possession of a different firearm on February 26, 2001. However, on motion of the Commonwealth, the trial court nolle prosequied five of the indictments. The prosecutor later amended the remaining indictment, with the permission of the trial court and over appellant’s objection. The amendment added to the language of the remaining indictment, including as an element of that indictment the possession of the five firearms previously specified in the five nolle prose*227quied indictments. Appellant was convicted on the amended indictment.
Appellant claims, because the trial proceeded “on an Indictment that was different from the detainer which had been lodged against him and which served as a basis of his transfer,” the trial court should have dismissed the amended indictment and returned appellant to federal custody. We disagree.
When making a request for final disposition of pending charges under the provisions of the Agreement, a defendant must strictly comply with the procedure established by the Code. See Yiaadey v. Commonwealth, 29 Va.App. 534, 541-42, 513 S.E.2d 446, 450 (1999). However, once properly invoked, “[t]his [Ajgreement shall be liberally construed so as to effectuate its purposes.” Code § 53.1-210, art. IX. The legislature enacted the Agreement to “secure speedy trials” to defendants held in other jurisdictions and to “reduce uncertainties which obstruct programs of prisoner treatment and rehabilitation.” Code § 53.1-210, art. I.
Article V(d) of the Agreement explains:
The temporary custody referred to in this agreement shall be only for the purpose of permitting prosecution on the charge or charges contained in one or more untried indictments, informations or complaints which form the basis of the detainer or detainers or for prosecution on any other charge or charges arising out of the same transaction.
(Emphasis added).
Appellant was tried on one of the indictments that formed the basis of the detainer. Although the original indictment was amended, the charge, date of offense, and factual elements remained essentially the same. Appellant conceded at oral argument that he was tried on the same offense for which he was originally indicted. We conclude he was not tried on a “different” indictment.
In addition, even if the amended indictment were “different,” it effectively incorporated the elements of the five nolle prosequied indictments into the remaining charge. All *228six indictments were based on appellant’s possession of six firearms in his home on February 26, 2001. The “different” indictment, therefore, arose out of the same transaction as the original six charges. Article V clearly allows such trials. See, e.g., Valentine v. Commonwealth, 18 Va.App. 334, 338, 443 S.E.2d 445, 447 (1994) (affirming two convictions where the charging indictments “arose from the same criminal transaction underlying the [three] arrest warrants], which accompanied the detainer,” although the three warrants eventually were quashed without being served).
Finally, even if appellant were correct that the detain-er did not include the charge of which he was convicted, his conclusion that the trial court did not have jurisdiction and should have dismissed the indictment is wrong. As this Court has held previously, “[A] defect in the manner in which a criminal defendant is brought before the court does not deprive that court of personal jurisdiction, preclude prosecution or vitiate a subsequent conviction. Therefore, the trial court did not err in denying appellant’s motion to dismiss.” Id. at 339, 443 S.E.2d at 448 (citation omitted).
For the reasons stated above, we affirm the trial court’s ruling.
Affirmed.