There are still problems. The school dropout rate for Gypsy children between 12 and 18 is a staggering 80 percent. Nearly 4 percent of the population still live in shacks.

And tales of day-to-day indignities are not hard to come by. At present, for instance, a troupe of Gypsy women is touring the country in a production of “The House of Bernarda Alba” by the poet Federico García Lorca, a performance that has been widely covered by the news media and won largely rave reviews.

But in Madrid, the actresses  who live in a shantytown in Seville and dress in traditional long Gypsy skirts  had trouble getting a taxi. Though accompanied by government officials, they were also refused service in a local bar.

Still, even advocates for the Roma say that Spain is way ahead of the rest of Europe.

One 2009 study conducted for the Fundación Secretariado Gitano looked at the housing of Gypsies in Bulgaria, the Czech Republic, Greece, Portugal, Romania, Slovakia and Spain, and found that over all a third lived in substandard housing, mostly apartments lacking heat, hot water or electricity. But in some countries, the situation was much worse. In Portugal, for instance, nearly a third of the Roma population still lived in shacks.

In Spain, 92 percent of Gypsies live in standard apartments or houses, according to the same study. Another survey, in 2005, found that 50 percent were formally employed, government officials said.

“Something like that is so important,” said Juan Mato Gómez, a director general in the Ministry of Health, Social Policy and Equality. “It addresses one of the basic myths about Gypsies  that Gypsies cannot hold down a steady job.”

Gypsies, who originally came from India, have been in Spain since the 15th century. Their traditions, such as their contributions to flamenco, have become part of Spain’s identity. Yet, until recently they faced persecution, sometimes intended to drive them out of the country, sometimes intended to force assimilation. At one point, they were required by law to marry non-Gypsies; at another, they were forbidden to gather in groups of more than four.