RIO DE JANEIRO, Brazil (AP) — Luiz Pinto was seemingly everywhere on the patio of his family's hillside home as diners tucked away the last of their pork and beans and a band sent the rumble of a samba beat bouncing across the unfinished cement floor.

Pinto navigated the tight spaces between tables and beamed a welcome to guests before rehearsing dance steps with an agility that belied his 70 years.

To Pinto and his family, this was much more than a party. They were trying to save the grouping of brick houses and shacks nestled in the lush foliage of Brazil's coastal rainforest where they and their ancestors have lived for more than a century but never legally owned.

The family first arrived as escaped slaves hiding out in a nearby cave. Since then, the surrounding area has become one of the city's most exclusive and governments and neighbors have relentlessly clamored for the eviction of the community known as Sacopa.

For Pinto's family, the samba fundraiser was a way to resist and to fight for title to their homes.

“My grandparents were running away when they came here; they didn't trust society out there,” said Pinto. “They stayed and this was passed down through the generations. This place is my life, my peace of mind, my identity. I was born here and I will die here.”

His battle is echoed across Brazil, in hundreds of other quilombos, communities founded by escaped slaves or their descendents. At the same time, efforts are mounting to promote black rights in a society with the world's second biggest population of African descent; only Nigeria's is bigger.

After generations denying the existence of racism, the federal government is promoting the country's black heritage in schools and social programs and a statute passed in 2010 forbids racial discrimination while trying to shrink race-based gaps in wealth and opportunity.

A university affirmative action program approved by President Dilma Rousseff this year is expected to increase the number of black students from 8,700 to about 56,000 in the next four years.

Despite such progress, in April the city of Rio de Janeiro blocked Sacopa from holding its regular samba fundraisers because neighbors had complained about the noise. In August, the City Council handed Sacopa a victory by approving designation of their plot as an area of “special cultural interest,” overturning the mayor's veto, and allowing the traditional gatherings to resume — helping the community raise money to pay lawyers.

Brazil is the only country that legally guarantees such communities a right to land and related benefits. However, that doesn't mean the right goes unchallenged or that the process of winning a title is easy. Bureaucracy, land conflicts and paltry government resources have meant long waits and uncertainty.

The federal government has recognized 1,983 quilombos so far; another 1,500 or so are still awaiting certification.

Of those recognized, only a fraction have received land titles. From 1995 to 2010, 120 quilombo land certificates were issued. Only three more have been added since then, though, even before winning titles, quilombos can get benefits such as specialized health care and help refurbishing homes, paving streets and growing businesses.

Residents of Sacopa finally won some relief in 2004, when the federal government offered official protection for their 20,000-square-foot plot.

The delay in receiving title, however, continues to be painful.

Last year, a judge ordered the community's entrance closed off with a chain for a week because a neighbor claimed the quilombo had charged for parking on its grounds. The order came without a warning or an opportunity to reply.

“I felt like an animal,” said Pinto. “We were treated like animals. I had to climb over a fence, at my age, to get out.”

Givania Maria da Silva, who coordinates titling of quilombos for the federal land reform agency, said the field of law is relatively new and implementation of the new rules has been complicated. Urban quilombos present extra complications, she said; land is often more valuable, so there are more competing claims.

Meanwhile, many still challenge the rights of quilombos to claim land, sometimes with threats or lawsuits.