Thousands of tribal Indonesians gathered on Sumatra, urging President Joko Widodo to protect their land rights.

On Friday, more than 5,000 people from 2,000 tribal communities convened in Tanjung Gusta village outside North Sumatra's provincial capital Medan.

The gathering is organised by the Indigenous Peoples Alliance of the Archipelago and held every five years.

"We'll fight for our rights to the last drop of our blood," said Abdon Nababan, the secretary-general of the alliance at the conference.

Indonesia's environment and forestry minister reiterated on Friday the government's commitment to tribal rights.

"It was only a start and not the end of this struggle," Siti Nurbaya Bakar told the gathering, referring to the December announcement to return customary lands.

Indonesia is home to an estimated 50-70 million tribal people, but many do not have formal title to the land their families have lived on for generations.

The alliance says more than 8.2 million hectares of forest belongs to the nation's myriad tribal groups, but Joko's government has so far only granted a total of 13,122 hectares to nine communities.

For decades they have been locked in bitter battles with logging, palm oil and mining companies that have been expanding into their homelands in the resource-rich Southeast Asian nation.

READ MORE: Four Indonesians richer than poorest 100 million

Widodo has pledged to improve their lives, but activists say his ambitious plans to boost infrastructure and energy production, including building dams, means that more tribes are at risk of being displaced.

"Even though the government has nice policies on paper, we continue to face land grabs ... and forced evictions throughout Indonesia," said Rukka Sombolinggi, deputy head of the alliance.

"We are willing to share, but development has to be done with our consent," she said.

Indonesia's Constitutional Court ruled in 2013 that the tribes have the right to manage forests where they live, in a verdict hailed as a victory for tribal land rights.

The government last December announced that it would return 13,000 hectares of customary lands to nine tribal communities, and committed to giving back a total of 12.7 million hectares - roughly the size of Greece - to local and tribal groups.

More than 230 tribal leaders and activists are currently on trial for battling to save their homelands, while at least six tribes face the threat of extinction as a result of land conflicts, said campaigner Sombolinggi, of the Sulawesi island's Toraja tribe,

"Our livelihood and our existence are being affected. When we are evicted from our land, what else do we have?" she asked.

Studies to be presented at the World Bank's 18th Annual Land and Poverty Conference in Washington, DC, next week confirm tribal leaders' claims that local communities are best-equipped to protect forests around the globe, the indigenous congress' organisers said.

One study suggests that carbon-rich peat lands that have been ravaged by annual forest fires in Indonesia could be saved if the government gives greater forest rights to local communities

"The findings suggest that granting communal land rights to indigenous inhabitants of tropical forests is among the most underused and effective solutions to combating violence, poverty and the illegal deforestation that fuels climate change," they said in a statement.