Since the images and videos of the maiming and killing of black foreigners in South Africa began to emerge on various social media platforms last week, Nigeria has been an emotionally frayed place. Tens of thousands of Nigerians live in South African cities and in recent years, they have become frequent targets of xenophobic attacks.

This time, anger in Nigeria boiled over and young Nigerians took to the streets protesting South African aggression and unleashing some of their own on South African-owned businesses.

The Nigerian government felt pressured to act and subsequently recalled its ambassador from Pretoria and announced it was pulling out of the World Economic Forum meeting on Africa which was held in Cape Town. While some Nigerians welcomed the move, others thought it was not enough and called on their government to intervene and rescue its citizens.

Examples abound of powerful countries going to great lengths to protect and repatriate their citizens who have faced danger abroad.

But Nigeria is not one of them. Indeed, in the past, the country has stood its ground on a number of occasions when defending its national interests. In the 1960s, for example, Nigeria had a face-off with France over the latter’s continuous tests of nuclear weapons in the Sahara desert. The government of Abubakar Tafawa Balewa acted decisively, breaking diplomatic relations with Paris, expelling the French ambassador and imposing a full embargo on French goods.

Throughout the 1970s and 1980s, Nigeria led the international effort to isolate and pressure the apartheid regime in South Africa. It threatened economic action against Western powers for refusing to sanction the regime and supported the national liberation movements in Southern Africa, including the African Nation Congress (ANC), with millions of dollars annually.

In the 1990s, the country, under the leadership of military ruler Sani Abacha, defied international sanctions and welcomed a visit by Libyan leader Muammar Gaddafi. It also directly intervened in the Liberian civil war, dispatching Nigerian troops to fight.

Most of the reactions to the violent attacks on Nigerians and other Africans in South Africa reflect a yearning for Abacha-style diplomacy. But as recent developments in its relations with the United States demonstrated, Nigeria can no longer wield such diplomatic power. Last month, the Nigerian government was spectacularly quick to react to the US’s reciprocal rise in visa fees by reducing the charge for Americans applying for a visa to enter the country. And last year President Muhammadu Buhari decided to “keep quiet” on President Donald Trump‘s alleged “s***hole” remark about African nations.

At present, it is clear Nigeria does not have the military, the intelligence capability or the diplomatic clout to pursue a serious escalation against even a regional power, such as South Africa.

This diplomatic “standoff” with Pretoria has exposed the weakness Abuja has masked in parading itself as a self-styled “Giant of Africa”. South Africa used to be a bully that Nigeria could restrain through its support for proxies inside the country and its neighbourhood. But since the end apartheid, this relationship has evolved into a regional competition, which Pretoria is winning.

After the sanctions and international isolation were lifted, South Africa quickly became the continent’s more favoured ally of developed economies and foreign investors. Pretoria emerged as the recipient of the largest share of foreign direct investment in sub-Saharan Africa and in 2011 joined the BRIC countries in an economic pact formed to challenge the domination of Western economic policy.

It is also an important trading partner that Nigeria cannot afford to lose. South African businesses have major investments in the country, including the DSTV cable service, MTN telecom, the Shoprite supermarket chain and others. Nigeria exports $3.83bn worth of goods, mostly oil and oil products, to South Africa. By contrast, it imports just $514.3m of South African products, which accounts for less than one percent of total South African exports.

The more contrasting feature of the two economies, and which again highlights Nigeria’s weakness is that while Abuja levers around a commodity-dependent economy, Pretoria has built a highly-diversified economy with a superior industrial structure. In other words, Nigeria needs South Africa economically, much more than South Africa needs Nigeria.

Nigeria’s geopolitical power has also waned in recent years, while South Africa has remained a major regional power. Abuja has been battling with a rebellion in the north for years and has struggled to put a stop to flares of tribal violence regularly killing dozens of people. In its neighbourhood, Nigeria continues to feel largely insecure, surrounded by Francophone countries whose allegiances to France threaten the commitment of the Economic Community of West African States (ECOWAS) to stability and non-aggression in the region.

The Nigerian government has also been unable to muster enough influence in the West to become a trusted partner. In 2014, the Obama administration, for example, blocked the sale of arms to the Nigerian military. The Trump administration decided to proceed with it but under heavy conditions which Nigerian officials have deemed “unacceptable“. Western reluctance to sell weapons to Abuja has pressed it to seek arms on the black market. South Africa has embarrassed it twice in recent years by intercepting large arms shipment bound for Nigeria.

In this sense, the Nigerian government cannot do anything about the violence against its citizens in South Africa beyond making a few symbolic diplomatic moves and bringing up once again the Nigerian role in liberating South Africans from its white oppressors. It is clear that in doing so it is addressing Pretoria from the position of weakness.

Indeed, using persistent references to sub-Saharan African commonality and solidarity as a result of shared history, race and geography is not an effective foreign policy tool.

The idea of One Africa is a farce taken too far, and successive Nigerian elites have pandered to this fantasy to the detriment of national interests. The legacy of this pan-African misadventure is a geopolitically weak Nigeria which cannot stand up to for itself and for its citizens

This very much has to do with mismanagement of the economy. The redemption Nigeria needs is one that moves the country away from dependence on oil exports, foreign imports and interventions and towards diversification and industrialisation. We cannot afford to glorify the idea of producing pencils in the age of artificial intelligence any more.

Only if the country becomes materially secure and industrially productive will it be able to regain its soft power and international clout and stand up to the old bullies in its neighbourhood.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.