ALEXANDRA LORAS has lived in eight countries and visited 50-odd more. In most, any racism she might have experienced because of her black skin was deflected by her status as a diplomat’s wife. Not in Brazil, where her white husband acted as French consul in São Paulo for four years. At consular events, Ms Loras would be handed coats by guests who mistook her for a maid. She was often taken for a nanny to her fair-haired son. “Brazil is the most racist country I know,” she says.

Many Brazilians would bristle at this characterisation—and not just whites. Plenty of preto (black) and pardo (mixed-race) Brazilians, who together make up just over half of the country’s 208m people, proudly contrast its cordial race relations with America’s interracial strife. They see Brazil as a “racial democracy”, following the ideas of Gilberto Freyre, a Brazilian sociologist who argued in the 1930s that race did not divide Brazil as it did other post-slavery societies. Yet the gulf between white Brazilians and their black and mixed-race compatriots is huge.

Brazil took more African slaves than any other country, and now has nearly three times as many people whose ancestors left Africa in the past few centuries as America does. Yet black faces seldom appear in Brazilian newspapers outside the sports section. Few firms have black bosses. The government has not a single black cabinet member; its predecessor, which called itself progressive, had one—for equality and rights. On average black and mixed-race Brazilians earn 58% as much as whites—a much bigger gap than in America (see chart). The gap in Brazil, as in America, used to be even wider. Much progress has come from anti-poverty schemes, which, though colour-blind in design, benefit darker-skinned Brazilians more, since they are poorer. More recently, Brazil has started to try explicit racial preferences (known in America as “affirmative action”). But American ideas cannot simply be transplanted to Brazil. Differences in how the two countries were colonised, and how the slave economy operated, led to distinct ideas of what it means to be “black”—and different attitudes to compensatory policies and whom they should target.

Of the 12.5m Africans trafficked across the Atlantic between 1501 and 1866, only 300,000-400,000 disembarked in what is now the United States. They were quickly outnumbered by European settlers. Most whites arrived in families, so interracial relationships were rare. Though white masters fathered many slave children, miscegenation was frowned upon, and later criminalised in most American states.

As black Americans entered the labour market after emancipation, they threatened white incomes, says Avidit Acharya of Stanford University. “One drop” of black blood came to be seen as polluting; laws were passed defining mixed-race children as black and cutting them out of inheritance (though the palest sometimes “passed” as white). Racial resentment, as measured by negative feelings towards blacks, is still greater in areas where slavery was more common. After abolition, violence and racist legislation, such as segregation laws and literacy tests for voters, kept black Americans down.

But these also fostered solidarity among blacks, and mobilisation during the civil-rights era. The black middle class is now quite large. Ms Loras would not seem anomalous in any American city, as she did in São Paulo.

Colour card

In Brazil, unlike America, race has never been black and white. The Portuguese population—700,000 settlers had arrived at the start of the 19th century—was dwarfed by the number of slaves: a total of 4.9m arrived. Portuguese men were encouraged to consort with African women. Since most came without wives, such unions gained some legitimacy. Their offspring, referred to as mulatto, enjoyed a social status above that of pretos. They worked as overseers or artisans, but also doctors, accountants and lawyers. A mulatto, Machado de Assis, was regarded as Brazil’s greatest writer even during his lifetime in the 19th century.

Mixing led to a hotch-potch of racial categories. In 1976 the Brazilian Institute of Geography and Statistics (IBGE) recorded 134 terms used by Brazilians to describe themselves, mostly by skin colour. Some were extremely specific, such as branca suja (literally “dirty white”) or morena castanha (nut-brown). The national census offers just a few broad categories—as in America, which offers five, though these days America’s also allows you to tick as many as you like and add a self-description. Tiger Woods, a golfer, calls himself “cablinasian” (a portmanteau of caucasian, black, American Indian and Asian).

Both black and white Brazilians have long considered “whiteness” something that can be striven towards. In 1912 João Baptista de Lacerda, a medic and advocate of “whitening” Brazil by encouraging European immigration, predicted that by 2012 the country would be 80% white, 3% mixed and 17% Amerindian; there would be no blacks. As Luciana Alves, who has researched race at the University of São Paulo, explains, an individual could “whiten his soul” by working hard or getting rich. Tomás Santa Rosa, a successful mid-20th-century painter, consoled a dark-skinned peer griping about discrimination, saying that he too “used to be black”.

Though only a few black and mixed-race Brazilians ever succeeded in “becoming white”, their existence, and the non-binary conception of race, allowed politicians to hold up Brazil as an exemplar of post-colonial harmony. It also made it harder to rally black Brazilians round a hyphenated identity of the sort that unites African-Americans. Brazil’s Unified Black Movement, founded in 1978 and inspired by militant American outfits such as the Black Panthers, failed to gain traction. Racism was left not only unchallenged but largely unarticulated.

Now Brazil’s racial boundaries are shifting—and in the opposite direction to that predicted by Baptista de Lacerda. After falling from 20% to 5% between 1872 and 1990, the share of self-described pretos edged up in the past quarter-century, to 8%. The share of pardos jumped from 39% in 2000 to 43% in 2010. These increases are bigger than can be explained by births, deaths and immigration, suggesting that some Brazilians who used to see themselves as white or pardo are shifting to pardo or preto. This “chromatographic convergence”, as Marcelo Paixão of the University of Texas, in Austin, dubs it, owes a lot to policy choices.

The first law signed by Luiz Inácio Lula da Silva, a white former metalworker who was Brazil’s president in 2003-10, required schools to teach about Brazil’s African slaves. He introduced a “Black Consciousness Day” on November 20th, on which day in 1695 the leader of a slave rebellion died. In 2004 an Afro-Brazil Museum opened in São Paulo. A few states and cities now have racial quotas when hiring, as do the diplomatic service and federal police.

Brazil’s public universities—which are more prestigious than private ones—have also introduced admissions preferences based on race and class. In 1997 barely one in 50 young pretos or pardos were studying at university or had graduated. That share rose rapidly as the economy improved and incomes rose, and from the early 2000s a handful of public institutions began to reserve some places for non-white students. In 2012 the supreme court ruled the practice constitutional. Shortly afterwards Lula’s successor, Dilma Rousseff, brought in racial quotas at all 59 federal universities and 38 technical schools. The effects are already visible on campuses. A study published in August found that between 2010 and 2014 the share of students at federal universities who described themselves as pretos or pardos jumped from 41% to 48%.

There were fears that those admitted under quotas would struggle, as some think they have in America. The test that American students take to enter university is a good predictor of academic success, and American colleges typically admit black and Hispanic students with much lower scores than whites or Asians. This sets them up to fail, argue Richard Sander and Stuart Taylor in their book, “Mismatch”. They think that under race-neutral policies more would graduate. Though narrowly approved by the Supreme Court, affirmative-action policies are unpopular in America. Two-thirds of Americans disapprove of the use of race as a factor in college admissions, according to Gallup.

In Brazil, the picture is different. For the few able to afford private schools and intensive coaching, getting into public universities used to be relatively easy. Entrance exams were poorly designed and old-fashioned; though they have been updated, they are still a crude measure of ability. This is perhaps why hard-working, ambitious cotistas, as students admitted under quotas are known, are able to hold their own. The first universities to adopt quotas have found that cotistas had lower grades on entry but graduated with degrees similar to those of their classmates. From this year half the places in all Brazil’s public universities will be reserved for students who have attended state schools, which prosperous ones seldom do. Half these quota places are reserved for applicants whose family income per person is no more than 1.5 times the minimum wage; and black, mixed-race and indigenous Brazilians are granted quota places in proportion to their share of the local population. The policy has wide support: a poll in 2013, soon after the law was passed, found that two-thirds of Brazilians approved. Naturally, some people game the system. A study in 2012 by Andrew Francis of Emory University and Maria Tannuri-Pinto of the University of Brasília (UnB) found that some mixed-race but light-skinned applicants to UnB, which introduced quotas in 2004, thought of themselves as white but said they had black heritage to improve their chances of getting in. Once admitted, some reverted to white identity. But not all, as “curly clubs” springing up on previously straight-hair-obsessed campuses attest. Brazil has a long way to go before it has a black middle class to rival America’s. A study in 2009 by Sergei Soares found that if the incomes of black and white Brazilians continued to evolve at 2001-07 rates, they would converge by 2029. But a subsequent severe recession has almost certainly pushed this further into the future. Employers continue to favour lighter-skinned job applicants. Less than a quarter of the officials elected in the federal and state races in 2014 were preto or pardo. “Decolonising your mind is tough,” sighs Ms Loras, whose experiences in Brazil have turned her into a black activist.

But there are hints that an American-style black consciousness is emerging in Brazil—and not only on campuses. In February Ms Loras counted 17 black models on the covers of glossy magazines. Two years earlier, she says, there were hardly any. She is publishing a children’s book about famous black inventors. In America such titles are common; in Brazil hers will be the first. According to Renato Araújo da Silva of the Afro-Brazil Museum: “We Brazilian blacks are finally learning to be black.”