It sounds like a punchline: how does a team of prisoners win the World Cup? On penalties!
That's how Peru did it, getting out of jail to beat Russia in a tense final at the giant Lima Stadium last week.
It wasn't the real thing -- that begins in Russia later this month -- but a deadly serious competition nevertheless that Peru's prison authorities are calling the first World Cup of prisons.
Anticipation of the Andean nation's first appearance at a World Cup finals in 36 years has reached fever pitch, and for its chronically overcrowded prisons, the shadow prison tournament provided a rare, sweet breath of freedom.
"At last I can breathe a little air," sighed Francis Valero, a tattooed 27-year-old locked up in Lima's Lurigancho jail for drug trafficking. "We are hoping this will help us get reintegrated into society for good conduct."
Each of the 16 prisons included in the unique competition took the name, and the colors, of a country participating in the finals.
All the matches observed the national anthems of each participating "national team" and officiating at the matches were a trio of professional referees.
The initial phases of the monthlong competition, which involved shackled inmates crisscrossing the country in buses amid high security, was played in dusty exercise areas. The prize for the finalists? Playing in the wide open spaces of the capital's massive 60,000-capacity Lima Stadium.
For security reasons, the stands at the stadium were almost empty. The few family members permitted per player were vastly outnumbered by 200 armed police wearing bullet-proof vests.
But that did not stop them from living the moment as if they were fans, and players, in a real World Cup finals.
Peru, represented by Lurigancho prison, beat "Russia" -- a team from Chimbote prison in northern Peru -- on penalty kicks after it ended all square at full time.
The champions received a cup, gold medals and sports outfits as prizes.
"I feel free for a moment, I know that I will go back very soon. This title, I dedicate it to my family, the sacrifice was worthwhile," said victorious Lurigancho player Thomas Manuel Aguirre, serving a sentence for aggravated robbery.
"The magic of football is that it has what establishes the rules of a community," said National Penitentiary Institute head Carlos Vasquez told AFP.
"In football, just like in a community, we face a team and we have to understand that's it's not an enemy but the other side, you have to play by the rules of the game."
Like a real tournament, the tournament was grouped into four "host" prisons in cities in Ancon, Chimbote, Ica and Lima.
The semi-finals were played in Lurigancho, which has the dubious reputation of being the most overcrowded of Peru's 69 prisons. Built to houses 3,500 prisoners, it is home to 9,700 inmates, many of them categorized as "highly dangerous."
"Overcrowding is critical in Peruvian prisons, where there are 187,000 inmates. But you sense it less when there is order," Vasquez said, after handing out the winners' medals after the final.
"The inmates may have violated the rules, they may have committed a crime, but football unites them along with the nation with the country's participation in the World Cup."
For inmate Omar Jaramillo Mendez, in jail for aggravated robbery, it was a chance to get a feel for life outside prison walls again.
"For us it represents something important, that we, as human beings, reintegrate into society and become better people in the future," he said.