A former minister in Israel has admitted to spying for regional rival Iran as part of a plea deal in exchange for an 11-year prison sentence, the Israeli justice ministry has said.

The ministry on Wednesday said Gonen Segev reached a plea bargain after confessing to severe espionage and passing information to an enemy country.

The Jerusalem District Court set a sentencing hearing for February 11.

Segev, energy minister from 1995 to 1996, was indicted in June. The Shin Bet internal security service said at the time that he was recruited by Iranian intelligence while living in Nigeria.

The trial of Segev opened in July, but was held behind closed doors with few details of the accusations publicly released.

Investigators found that Segev made contact with officials at the Iranian embassy in Nigeria in 2012 and that he visited Iran twice for meetings with his handlers, the Shin Bet said.

Segev, who was extradited from Equatorial Guinea and arrested in May, was charged with providing Iran information about "energy market and security sites in Israel".

The ministry said there was a gag order on further details.

Segev, a physician, was jailed in 2004 for attempting to smuggle "Ecstasy" pills into Israel and left the country in 2007 after his release from prison.

Segev served in the Labour government of former Israeli Prime Minister Yitzhak Rabin after defecting from the far right to cast the decisive vote in favour of the Oslo II peace agreement with the Palestinians.

Israel has long been locked in a shadow war with Iran, which supports armed groups in the Gaza Strip and Lebanon.

Iran has accused Israel of sabotage and assassinations of scientists involved in its nuclear programme.