SANTIAGO, CHILE — A Russian man who served three years in a Chilean prison for drug trafficking is being allowed to remain in the country to play professional soccer.

Twenty-five-year-old Maxim Molokoedov finished his prison term Friday. He has been training with the Santiago Morning club in Chile’s second-tier league since last season under a special permit.

During a ceremony at the National Stadium, Justice Minister Juan Ignacio Pina said that an order to expel Molokoedov from Chile has been revoked.

“Maxim has been able to prove that reintegration and rehabilitation are possible,” Pina said.

Back home in Russia, Molokoedov played for second-division soccer team FK Pskov 747. He was arrested during a stop at the airport of the Chilean capital of Santiago in 2010, carrying about 13 pounds (6 kilograms) of cocaine that he planned to smuggle to Europe inside children’s books.

Molokoedov regrets it and prefers not to talk about it, calling it, “a bad memory.” He says he is now only thankful to those who are giving him a second shot at life through soccer.

“I’m very happy and I want to thank all the people who helped me push forward and have the chance to triumph in Chile,” Molokoedov said during his last training session under custody.

During his last day in jail, he said goodbye to other inmates and the warden, who began letting him leave the prison grounds to play soccer as long he was accompanied by a guard.

The first days at Santiago’s penitentiary, Molokoedov slept in a crammed cell with four other prisoners. He didn’t speak a word of Spanish, he missed his family, and put his faith in a wooden rendering of St. Nicholas, known as the Wonderworker in the Russian Orthodox church.

The miracle came at the rocky prison yard’s pickup games. Inmates began offering him deodorant and a bar of soap to be treated to a few minutes of his dribbling skills and brutal right-footed shot.

Word about “El Ruso” reached former Chilean national coach Claudio Borghi, who said Molokoedov was good enough to go pro. It also reached Franklin Lobos, a former professional player who volunteers at prisons and who vouched for the Russian.

“We’re giving out a very clear message in this country,” Lobos said during the ceremony. “Second shots really do exist.”