JERUSALEM (JTA) — A former Israeli lawmaker was arrested on suspicion that he spied on Israel for Iran.

Gonen Segev was arrested last month, the Israel Security Agency, or Shin Bet, said in a statement issued Monday.

On Friday, the state attorney filed a criminal indictment against Segev in Jerusalem District Court for spying and other charges related to passing information to an enemy country.

Segev, a physician, was energy and infrastructure minister from 1992 to 1995. He served more than two years of a five-year prison sentence beginning in 2005 for trying to smuggle more than 30,000 ecstasy tablets into Israel from the Netherlands and for forging a diplomatic passport. He later moved to Nigeria, where he continued to practice medicine.

Segev was arrested in May trying to enter Equatorial Guinea, which refused him entry due to his criminal record, and turned him over to the Israel Police.

A joint Israel Security Agency and Israel Police investigation found that Segev has been working with Iranian intelligence and providing them with information about Israel’s energy economy, security sites in Israel, and diplomatic and security personnel and buildings, according to the agency.

According to the investigation, Segev and elements from the Iranian Embassy in Nigeria made contact in 2012. The statement said Segev subsequently visited Iran twice to meet with his handlers “in full knowledge that they were Iranian intelligence operatives.”

“Segev also met with his Iranian handlers in various hotels and apartments around the world which he assumed were used for covert activity, the statement said. “Segev even received secret communications equipment for encoding messages between him and his handlers.”

As part of his mission, Segev put Israeli citizens in the foreign affairs and security fields in touch with Iranian intelligence agents who he passed off as Iranian businessmen, according to the agency.

Other details of the case against Segev remain under a gag order.

Israeli media outlets reported that Segev had initiated the contact with Iran and that in 2016, the Israeli Health Ministry rejected a request from Segev to reinstate his medical license so he could return to Israel.