An American social media influencer who has been stuck in a Chilean airbase in Antarctica for two months after landing a plane there without permission was released back to the mainland on Saturday, where he was to pay $30,000 in penalties.

The 19-year-old pilot Ethan Guo had been on a fundraising mission for cancer research and was attempting to become the youngest person to fly solo to all seven continents.

But he was detained after Chilean authorities said he lied to officials by providing authorities with “false flight plan data.”

Prosecutors said he had been authorized to only fly over Punta Arenas in southern Chile, but that he kept going south, heading for Antarctica in his Cessna 182Q — a single-engine light aircraft known for its versatility.

After he landed in Antarctic territory on June 28, he was detained in a Chilean military base amid legal negotiations between his lawyers and the government.

He spent two months living in the base with limited communications and freezing Antarctic winter temperatures plunging below zero.

He was released by a Chilean judge on the condition that he donate the tens of thousands of dollars to a childhood cancer foundation within 30 days and leave the country as soon as possible.

He is also banned from entering Chilean territory for three years.

The influencer's lawyer, Jaime Barrientos, told The Associated Press that Guo landed because he had to divert his aircraft due to poor weather conditions and that he received authorization from Chilean authorities.

Barrientos said he was happy with the agreement struck with authorities.

Guo landed Saturday at the port of Punta Arenas aboard a navy ship wearing a Chilean national soccer team jersey and appeared friendly with the press after disembarking, describing his detention as a “mundane” experience with “limited freedoms”.

“The Chilean people have been incredibly hospitable, they’ve been fantastic people. They’ve taken care of me. They've taught me Spanish, and they've treated me like family,” he said.

AP Video by Claudio Monge and Jamey Keaten