The World Cup kicked off on Thursday, and within hours, South Africa's Bafana Bafana lost 2-0 to co-host Mexico. But the scoreline wasn't the only thing burning. Social media erupted — not with African unity, but with mockery.

Fans from across the continent openly cheered for Mexico. Memes flooded timelines: sombreros, mariachi bands, tacos. Some Africans changed their profile pictures to the Mexican flag and adopted Spanish-sounding names. The caption? "Mexico versus xenophobia."

The banter wasn't random. It was a direct response to the recent wave of xenophobic attacks and threats against African migrants in South Africa. Anti-migrant groups have set a 30 June deadline for foreigners living illegally in the country to leave. In recent weeks, there have been protests, intimidation, and violence.

One X user summed up the mood: "You want people to cheer for you when you play soccer just because we're African?" Another wrote: "We're supporting Mexico so that South Africa can go back home early to protect their jobs." The joke plays on the unfounded claim that foreigners are stealing jobs in a country with over 30% unemployment.

Prominent Kenyan lawyer Ahmednasir Abdullahi posted: "I hope South Africa isn't blaming African migrants for the 2-0 defeat and two red cards in the match against Mexico."

Daniel Kaniki, a Congolese football fan watching in Atlanta, told the BBC: "Africa is like one country and if one is chasing others, we aren't a family any more. That's why I'm supporting Mexico today."

But not every African agreed. Ghanaian Vanlare Quist, also in Atlanta, said he backed South Africa as "a proud African" and blamed the anti-immigrant sentiment on a few individuals. In South Sudan, fans at public viewing centres in Juba were solidly behind Bafana Bafana. Student George Kenyi Charles Rehan said: "It was unfortunate that on social media we saw some African countries supporting Mexico... As South Sudanese, we are behind South Africa — because they're representing Africa."

South Africans pushed back hard online. One posted: "We qualified for the World Cup alone without your support and whether we win or lose we will remain South Africans who love their country. And illegal immigrants will still leave our country whether you hate us or not." Another said: "They can support Mexico all we want we aren't backing down. Come to South Africa legally."

The South African government issued a statement commending Bafana Bafana for their "spirited performance," saying the team represented the country with unity and pride.

President Cyril Ramaphosa has warned against people taking the law into their own hands, insisting only authorised officials can enforce immigration laws. But he also said South Africans' concerns "deserve to be heard."

The tension has real consequences. On Wednesday, Nigeria became the latest African country to evacuate its citizens from South Africa. Ghana, Zimbabwe, and Malawi had already done so, citing credible threats. Many Africans moved to South Africa after apartheid ended in 1994, seeking better opportunities. Now, with high unemployment and rising xenophobia, the dream has soured.

South Africa still has two group matches left. But for many African fans, the damage off the pitch may be harder to repair than any loss on it.