Japanese police have caught the first man to break out of jail in the country for 20 years, which he managed in just his underwear.

Li Guolin, who was serving 23-year sentence, was caught near a primary school on Friday just over a mile from the Hiroshima prison.

Li's escape had gained wide media attention in Japan, with the public broadcaster NHK breaking into programming to show police taking him into custody.

He was shown wearing a heavy jacket and a ski cap pulled down over his face as he was taken into custody. NHK also reported Li had a knife on him when he was arrested.

Li is suspected of breaking into nearby apartment to steal some clothes after he jumped the prison walls in just his underwear on Wednesday. Japanese media also report that Li stole a beer whilst he was at the apartment, which the police were able to trace his DNA on.

Hiroshima police confirmed his arrest, but had no further comment. Officials said it was the first time someone had managed to escape from a Japanese penitentiary since 1989.

After stripping down to his underwear, Li escaped by using scaffolding put up by builders to climb over the 16 ft perimeter wall, which was under construction. Sensors of the wall switched off while the repairs were taking place. It is alleged that it took officials at the prison 30 minutes to notice that Li had escaped.

"We apologize for causing serious safety concerns to the neighbours," Chief Cabinet Secretary Osamu Fujimura said. "We'll make sure that prisons and related institutions take steps so that they will never repeat the same mistake."

Li, believed to be the leader of a gang of burglars, was convicted in 2005 for shooting at a police officer and stealing a squad car.