BLACK British history did not begin in the 20th century. In 1578 George Best, a travelling diarist, wrote of meeting “an Ethiopian as blacke as a cole brought into England”. But it was after the 1940s that Britain’s black population really began to grow, with two waves of immigration. The first, from the 1940s to the 1960s, carried poor Caribbeans to British shores. The second, beginning in the late 1980s, came from Africa, as wealthy Nigerians and Ghanaians arrived alongside rural migrants and refugees from Somalia and Zimbabwe.

Britain’s black population is now about 2m, or just over 3% of the total. The census divides it into two main categories: “black African” and “black Caribbean”. Until the turn of the century, Caribbeans were in the majority. But in the ten years to 2011, the African population doubled. And that is not the end of the changes: although Caribbean Britons are substantially better off than their African neighbours, demographic and educational trends suggest that the tables may soon be turned.

Thamesmead, an east-London suburb that is home to Britain’s most-concentrated African population, illustrates the group’s struggles. Its bleak residential towers, where Stanley Kubrick shot “A Clockwork Orange”, are overcrowded, says Mabel Ogundayo, a 24-year-old local councillor. Most of its crammed-in residents are tenants; nationwide, less than one-quarter of Africans are owner-occupiers, compared with nearly one-half of Caribbeans. That is partly why Caribbean households are, on average, much better off: in 2009 the Office for National Statistics (ONS) found that the average one had £76,000 ($109,000) in assets, against £15,000 among Africans.

Caribbeans also fare better at work. Africans are less likely to be employed, and more likely to toil in low-skilled occupations. Much of this is down to their more recent arrival: although four out of ten have degrees—more than any ethnic group other than Chinese and Indians—many studied at unrecognised foreign universities, and some speak little English. As a result, 41% of African graduates work in non-graduate jobs, compared with 28% of Caribbeans. Their employment rate is dragged down by some groups that have particularly struggled: few from the mainly refugee Congolese or Somali communities are in work, for example.

Yet the fact that much of their disadvantage is owing to their recentness suggests that, with time, it will be overcome. Many are richer than the first wave of Caribbeans. New Nigerian immigrants are less likely to be employed than new Jamaicans, but this stops being the case after five years in the country, according to the ONS. And although Africans are more likely than whites to be in low-paid work, the gap disappears once factors such as age, occupation and language have been controlled for. As new generations are minted and old ones learn English, earnings can be expected to rise.

There is already progress in schools and universities. In 2014, 68% of Africans got five good grades in their GCSEs, the exams taken at 16, compared with 65% of whites and 59% of Caribbeans. They are far more likely to continue their education—indeed, the poorest Africans are as likely to go to university as the wealthiest Caribbeans. Although there is little difference in performance at primary school, Caribbean children “lack the support that’s needed to deal with the choppy waters of secondary school,” says Tony Sewell, the founder of Generating Genius, a charity. Africans, as newer arrivals, “have the mindset that there’s always something worse [than schoolwork] out there,” he adds.

And although discrimination remains real, it is less pervasive than when Caribbeans first arrived in Britain. Archived government papers released last month showed that in 1985 Margaret Thatcher was warned by advisers that grants to black entrepreneurs would end up in the “disco and drug trade”. Back then, 50% of Britons admitted to NatCen, a research organisation, that they would mind if a close relative married a black person. Now, the figure is 22%. (Prejudice has found new targets: 44% say they would be bothered by a relation marrying a Muslim.)

Africans remain less integrated than Caribbeans. Eight out of ten Africans choose an African partner, whereas by comparison less than half of Caribbeans settle down with a fellow Caribbean. A child under ten who has a Caribbean parent is more than twice as likely as not to have a white parent.

Some believe that Africans’ delay in integrating may actually help to explain their success. West Africans, in particular, have a “separateness and social distance” in areas such as language, dress and religious worship “which seems to carry a protective effect”, says Trevor Phillips, a former head of the statutory Equality and Human Rights Commission. Caribbeans, by contrast, resemble whites in their performance at school—that is, both do pretty badly, after controlling for income.

Others dispute the value of “separateness”, arguing that minorities benefit more from mixing. That is where official efforts focus. With second-generation Africans already starting to integrate more quickly, the theory will soon be put to the test.