DAKAR, Senegal  The last time foreigners tried to topple the government of the tiny, oil-rich nation of Equatorial Guinea, it was a band of upper-crust Britons-turned-mercenaries involved in an elaborate plot, allegedly for a shadowy businessman, in exchange for cash.

On Thursday, officials in Equatorial Guinea said they had arrested 16 men in an equally bizarre but even more mysterious attempt this week to overthrow the government of Teodoro Obiang Nguema Mbasogo, who has ruled the country, a former Spanish colony, for almost three decades.

Men in speedboats attacked the capital, Malabo, which sits on an island off the West African coastline in the Gulf of Guinea. They struck before dawn on Tuesday and were heavily armed, the government said in a statement, but the army, using boats and a helicopter, quickly repelled the attack.

Diplomats and analysts say the evidence points to a nearer menace than last time: militants from the Niger Delta region of Nigeria. Fighters from ethnic minorities in the oil-rich region have carried out insurgencies there for decades, demanding a greater share of the country’s oil wealth. In recent years, they have gained steam, carrying out increasingly sophisticated attacks on oil installations far out at sea.