An Indonesian man hitched a ride to the country’s capital by clinging to the landing gear of a commercial plane, officials said on Wednesday.

Mario Steven Ambarita, aged 21, sneaked on to the asphalt at an airport in Sumatra on Tuesday before clambering aboard the Boeing jet’s landing gear, air transport ministry director general, Suprasetyo, said.

The stowaway remained there for the hour-long flight to the international airport just outside Jakarta, where he was discovered upon landing.

“He really put his safety in danger,” Suprasetyo said. The plane flew as high as 34,000ft (10,350m), where the oxygen was very thin and temperatures below 0C (32F).

Ambarita admitted to authorities that he had been planning the daring adventure for a year, staking out the airport in advance.

Local reports suggested the man was desperate to visit his birthplace, Jakarta.

Suprasetyo said the unexpected passenger still managed to walk when the plane landed, but was staggering and had a bleeding ear.

“But his condition is now fine,” Suprasetyo said.

The man is still being questioned, and could face a one-year jail term if charged with putting the Garuda flight in danger.

The transport ministry has sanctioned local airport authorities for negligence and promised to improve security across the archipelago to prevent similar incidents in the future.