RIO DE JANEIRO — Brazilian pilot Gerard Moss glided into Rio Friday, completing the first around-the-world flight in a motor-glider and an odyssey that landed him in a Vietnamese jail and nearly ended at the bottom of the ocean.

The elegant, long-winged craft called "Ximango" swooped over the Jacarepagua airport in western Rio before sliding up to a hangar where dozens of friends and fans greeted the 46-year-old Moss.

"It was a long and tough battle. More than once I thought the plane wasn't going to make it and I put on the parachute, but we came through," the red-haired, mustachioed pilot said after he stepped out of the cockpit and hugged his wife, Margi.

The 34,375-mile voyage took 100 days and included stops in 30 countries. Moss chronicled his adventures on a Web site www.wingsofwind.com.

Near Japan, two F-15 fighter jets circled Moss when he deviated from his course. In Vietnam he was jailed after landing at an airport without a permit. And halfway through the voyage, his automatic pilot broke.

Moss, a Swiss-born mechanical engineer naturalized Brazilian, said the worst moment came when he was headed from Vietnam to Thailand and ran into a monsoon.

"I was in the middle of the sea, hundreds of kilometers from land and there was lightning and rain and clouds everywhere and I didn't know if I was going to live or die," he said. "I almost jumped into the ocean."

Moss flew solo except over Siberia, "where you can go 1,000 kilometers (620 miles) without seeing anyone."

He and a Russian co-pilot used fuel scavenged from abandoned planes with the help of locals to get through the barren expanse.

After more than three months in the cramped cockpit and just 22 pounds of luggage to keep him company, Moss said: "I just want to sleep in my own bed and eat in my own home."

The adventure isn't quite over. During the journey, Moss used a special ozone sensor to monitor air pollutants. The data was sent to laboratories at England's Cambridge University and the Sao Paulo State University of Bauru for analysis that will take a year to complete.

"There were moments of melancholy seeing all the pollution," Moss said.

Still, he was glad that he didn't postpone the flight.

"With the tensions right now it would be impossible to do this kind of trip," he said referring to the crackdown on airspace following the Sept. 11 attacks by hijacked U.S. commercial jets in the United States.

Brazilian telephone company Embratel and Swiss Victorinox sponsored the flight in the Brazilian-made motor-glider. It is named Ximango after a local falcon and can glide or propel itself with a 100-horsepower engine.