A prisoner in a Peru jail allegedly drugged his twin brother, changed into his clothes and walked out a free man, authorities said.

Alexander Delgado was serving a 16-year sentence for child sexual abuse and robbery in a prison north of Lima when his brother, Giancarlo, went to visit him on Jan. 10, 2017, the Peru Ministry of Interior reported. According to authorities, Alexander drugged his brother and swapped places with him, then walked out of the prison.

It took investigators over a year to track him down.

The switch was confirmed by authorities, thanks to Giancarlo’s fingerprints.

Alexander was arrested on Monday in the port city of Callao after more than 13 months on the run. The Ministry of the Interior had offered a reward for information on Alexander’s whereabouts, which led to his capture.

Local media reported the inmate told authorities he planned his jailbreak “because I was desperate to see my mother.”

Alexander Delgado is expected to be transferred to a maximum-security prison in the southern highlands, BBC reported.

His brother was detained and investigated on suspicion of having collaborated with his twin. However, he was not charged and was eventually released.