Logging in the Brazilian Amazon has had a devastating effect on the rainforest and its indigenous people. However, a new operation by the army, air force and military police is designed to save an endangered tribe - by keeping loggers off their land.

It took Pira'I two small steps to get up into the helicopter, but those steps bridged two completely different worlds.

Pira'I is a member of a 350-strong tribe called the Awa. They live in the last islands of rainforest in what is now the extreme eastern edge of the Amazon.

He grew up in a tiny nomadic tribal group, completely separate from the rest of the world.

Now, together with his friend Hamo, he was taking his first ever flight, leaving the jungle where they have lived all their lives.

They gave me a nervous smile through the window, then the engine roared and their faces vanished in a great eddy of leaves and dust as the helicopter rose up into the air.

This was a momentous trip for them, and for the entire tribe.

Image caption Pira'I was one of two taken in a helicopter to see the destruction of farmers' homes

The Awa are one of very few hunter-gatherer communities left in the Amazon basin.

Survival International, a pressure group that campaigns for the rights of indigenous people, has described the Awa as "the most endangered tribe on the planet".

Find out more Image copyright AFP Listen to From Our Own Correspondent for insight and analysis from BBC journalists, correspondents and writers from around the world. Broadcast on Radio 4 on Thursdays at 11:00 BST, and Saturdays at 11:30 BST. Also on BBC World Service. Listen to the programme Download the programme

Over the last couple of decades illegal loggers and farmers have invaded their ancestral lands, destroying the forest.

I'd asked Pira'I what it was like growing up in the forest.

"We were always on the run," he told me. "We would find a place to sleep, then the loggers would arrive again to cut down our trees and we would go on the run again."

Pira'I and his family - like most of the Awa - were forced to give up their traditional lifestyle and move into villages. Incredibly, though, a few dozen Awa are holding out.

They remain uncontacted, living in the last stands of jungle in this region.

"It is a miracle they are not dead," one of the officers of Brazil's Indigenous People's Department, Funai, tells me.

Media playback is unsupported on your device Media caption Watch Justin Rowlatt's Newsnight film in full

With his extravagant beard, Leonardo Lenin, lives up to his dramatic name. He has dedicated his life to fighting on behalf of the tribal people of Brazil.

"This is a story of resistance," he says.

"For 514 years our culture has been trying to dominate their culture, but they have survived."

And, thanks to the efforts of people like Leo Lenin and Survival International they are now much more likely to do so.

That's because for once there is some good news from the Amazon.

I had come back to witness the Brazilian government's unprecedented effort to drive out the invaders and to take back the tribe's ancestral lands.

They have a truck with a hand of iron that destroys everything Hamo, Awa tribesman

It is called Operation Awa and is on an impressive scale.

The Brazilian army, air force and military police are working alongside Brazil's environmental protection service. The operation is co-ordinated by Funai.

Farmers who have illegally settled on the indigenous reserve that comprises the Awa's territory, have been served notice to leave. And they seem to be doing so.

The government has offered them plots elsewhere in the state.

I watched a family load up a truck with everything they own - including the tiles from the roof of the farm they'd lived in for 18 years.

Image caption Kamara, a member of the Awa tribe which is made up of approximately 350 members, 100 of whom have no contact with the outside world

It raised a great cloud of pink dust as it rumbled off down the rough track, the family clinging to the jumble of wardrobes, tables, beds - even a satellite dish.

Another day I watched raid on an illegal saw mill involving officers from Ibama, the Brazilian environment agency.

"I saw it with my own eyes, they have sent the non-Indians a long way away, they must have told them 'go away!' Pira'I, Awa tribesman

The trunks of huge trees lay scattered around it like so many matchsticks.

The Ibama agents took careful records of what they'd found, including the account books that carefully noted payments to the local police.

Then Agent Maria Luisa Gonclaves, who had led the raid, gave the order to torch the place.

"Isn't the fire beautiful," I heard her whisper to a colleague, as we watched great tongues of flame dance up into the night sky.

But how would the government show the tribe that the "invaders" had been driven out?

That's where the helicopter came in.

It flew Pira'I and Hamo, the two nervous Awa tribesmen, to the edge of the indigenous reserve where they watched a bulldozer destroy the shells of the farmers' homes.

Finally Pira'I relaxed, breaking into a big smile as the buildings collapsed.

When they arrived back at the village, a crowd gathered.

"The destruction is huge," Pira'I told them triumphantly.

"I saw it with my own eyes, they have sent the non-Indians a long way away, they must have told them, 'Go away! Go away!'"

"Are you sure they are not hiding in the forest and will come back?" asked someone.

"No, there is no-one left," Hamo replied with certainty.

"They don't have houses any more. The non-Indians have destroyed everything, even the school.

"They have a truck with a hand of iron that destroys everything," Hamo was clearly very impressed.

I felt privileged to be present on such a momentous day for the tribe.

But the truth is once the troops have gone the loggers and farmers will be back.

The big question is - is Brazil is willing to invest the resources necessary to keep them out permanently?

Only then will Pira'I, Hamo and the rest of the tribe be able to live in peace.

How to listen to From Our Own Correspondent:

BBC Radio 4: Saturdays at 11:30 and some Thursdays at 11:00

Listen online or download the podcast.

BBC World Service: Short editions Monday-Friday - see World Service programme schedule.

You can watch Justin Rowlatt's film on Our World, BBC News Channel Saturday, 21:30.

Follow @BBCNewsMagazine on Twitter and on Facebook