Image copyright Matsuyama prison Image caption Catch me if you can. Eventually the police were lucky

Japanese police have captured a fugitive who had eluded authorities for weeks in a bizarre drama that gripped the country.

Tatsuma Hirao, 27, had made a run for it from an open prison in the town of Imabari.

Police deployed more than 6,000 officers on the small island of Mukaishima, using everything from dogs to helicopters and drones.

He was caught at a train station in Hiroshima, about 70km (40 miles) away.

Hirao was not considered a dangerous criminal.

Serving five and a half years for theft, he was being held at a facility where inmates are free to walk about without walls or fences.

The system did not work in the case of Hirao. The first clues following his getaway were on Mukaishima.

On the face of it, the 22 sq km (8.5 sq mile) island of 22,000 people should not have been an easy place to hide.

Image copyright Kyodo News Image caption Police officers search properties on Mukaishima

Yet despite using helicopters, sniffer dogs and drones, Hirao kept eluding his pursuers.

All the police found were small clues: fingerprints, items like socks or mobile phones thought to have been stolen by the fugitive or even just rubbish from the food he ate.

When he stole a car, he left a note assuring the owner that "I'm borrowing your car but I'll never damage it".

The story created a nationwide media frenzy about how one person could outsmart police week after week.

The country's justice minister had to apologise publicly for failing to find the fugitive.

You might also be interested in:

One reason for the failure might have been that Mukaishima has around 1,000 unoccupied holiday homes scattered around the hilly, forested landscape.

Police were unable to enter any of them without a search warrant.

When he was eventually caught, Hirao reportedly told police he had swum across the sea to the mainland.