Indonesian police say they have detained a French man who trespassed on a military base while playing the augmented reality game Pokémon Go.

A spokesman for West Java police said Romain Pierre, 27, was caught at a checkpoint on Monday evening after initially running away when challenged by security guards at the military complex in Cirebon.

Pierre was released a few hours later because it became apparent “he unintentionally entered the complex as he was hunting Pokémon while jogging,” the police spokesman, Col Yusri Yunus, said on Tuesday.

“Pokémon Go,” which uses Google Maps and a smartphone to overlay reality with Pokémon creatures, has been a blockbuster hit in the US and other countries where it is available. It has not been officially released in Indonesia but is already popular.

The cabinet secretary, Pramono Agung, told reporters last week he had captured a number of Pokémon at the presidential palace in Jakarta, the Indonesian capital.

The governor of Jakarta has said it could be used to boost tourism to the city. But some security officials have voiced worries that the game could pose a security threat.

Police said Pierre works for a company in Jakarta and was visiting Cirebon, about 190km (118 miles) east of the capital.