By Beh Lih Yi

KUALA LUMPUR (Thomson Reuters Foundation) - After years of living in legal limbo, nearly 3,000 stateless people in the southern Philippines have been granted nationality by Manila and Jakarta this year, U.N. officials said on Monday.

The 2,957 people - including 1,226 children - are part of a group of some 9,000 people of Indonesian descent who have for generations lived in southern Mindanao in the Philippines.

Seafaring communities have crisscrossed the seas between the Indonesian part of Borneo island and the southern Philippines for centuries.

The group was given Philippine or Indonesian nationality this year in a move welcomed by the U.N. refugee agency UNHCR as a step toward an ambitious global goal to end statelessness by 2024.

"The cooperation between Indonesia and the Philippines is a good example of how states can work together to resolve this global problem," UNHCR's assistant high commissioner for protection Volker Türk said.

UNHCR estimates there are about 10 million stateless people worldwide, with large populations in Myanmar, Thailand, Zimbabwe and the Ivory Coast.

About 40 percent of them live in Southeast Asia, according to the U.N. agency.

Sometimes referred to as "legal ghosts", stateless people are not recognized as nationals by any country and as such, they are deprived of the basic rights most people take for granted.

Many of the stateless Indonesia descendants living in southern Mindanao interviewed in a 2014 UNHCR mapping study said they struggle with daily challenges including access to employment, livelihoods, education and clean water.

Under an old law, Indonesians would lose their citizenship if they lived abroad for over five years without registering with the Indonesian authorities.

Although the law was reformed later and Indonesians can reacquire their citizenship, many people do not formally apply for it and remain stateless, according to the UNHCR.

Meanwhile, in Thailand, which has one of the world's largest stateless populations, UNHCR said 23,000 people have been given Thai nationality over the last four years.

Many of Thailand's stateless are from hill tribes, with ancestral ties to their territory and are ethnically different from the Thai majority. Others are children of illegal migrants who fled to Thailand, particularly from Myanmar.

(Reporting by Beh Lih Yi @behlihyi, Editing by Ros Russell; Please credit the Thomson Reuters Foundation, the charitable arm of Thomson Reuters, that covers humanitarian news, women's rights, trafficking, property rights and climate change. Visit http://news.trust.org)