The Islamic Republic of Iran has denied allegations that it had trained militants arrested in Nigeria on charges of planning attacks on U.S. and Israeli targets in Nigeria.

Deputy Foreign Minister Hossein Amir-Abdollahian said such allegations were “made up as the result of the ill will of enemies of the two countries’ good relations”, Iranian state television reported on Friday.

“Iran and Nigeria have friendly and close relations and despite the vast efforts of the two countries enemies, in recent years relations and cooperation have always improved” he said.

The State Secret Service (SSS) on Thursday confirmed the arrest of Abdullahi Mustapha Berende and two other Nigerians in December after Berende, allegedly made several suspicious trips to Iran, where he interacted with Iranians in a “high-profile terrorist network”.

According to the SSS, Berende and his Iranian handlers were involved in “grievous crimes” against Nigeria’s national security.

Berende, who will now be charged in court, admitted to reporters at the SSS headquarters that he had carried out surveillance for the Iranians.

In 2004, Israeli sources said an Iranian diplomat was arrested on suspicion of spying on the Israeli Embassy in the Federal Capital Territory. Tehran denied any arrest.

In 2010, authorities at a Lagos Port found a hidden shipment of rockets, rifle rounds and other weapons from Iran, supposedly bound for Gambia.

A Nigerian and an Iranian face criminal charges over the shipment.