Rio De Janeiro -- 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 rain forest, in which 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," Pinto said. "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," which are 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 grow 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.

This past month, 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.

"This is a huge advance; it all happened in a few years," said Jan French, a professor of anthropology at the University of Richmond who has studied quilombos in Brazil.

"There are movements and people who struggled to make it happen, but also the Brazilian government has dedicated itself to making this happen."

The federal government has recognized 1,983 quilombos so far; another approximately 1,500 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 (1,860-square-meter) 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," Pinto said. "We were treated like animals. I had to climb over a fence, at my age, to get out."

Pinto manages not only his community's claim, but those of 38 other quilombos in Rio state as the president of the state quilombola association. Pinto said he's had to take tranquilizers to deal with the resulting headaches.

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.

"We're making new inroads every day," Silva said. "The law is not simple, and the situations are not simple. Often we're talking about land claimed by several farms. We're making every effort, but we just don't have enough people. We have to recognize that the demand is infinitely bigger than our capacity."

In the meantime, many still challenge the rights of quilombos to claim land, sometimes with threats or lawsuits. Among the criticism, some question federal laws letting people declare themselves quilombos, without first requiring anthropological studies.

"It's a great shift in mentality, but it's gradual," French said. "Not everyone in Brazil agrees."

At the regular pork-and-beans "feijoada" and samba soirees, renowned among the city's samba musicians since the 1960s, Pinto, a musician, sometimes sings and plays along with the band. The music, food and culture, he said, bind him to his ancestors and give him strength to continue resisting.

"Here we have the weight of history, the protection of nature, a taste of our Brazilian culture, and a family environment where people bring their children," said Lourdes Miranda, who has been a regular at Sacopa's sambas. "They're here, in the middle of all these buildings, resisting against all this real estate speculation. Coming here is a good reminder of what is important in life."