An ex-Israeli government official convicted for funneling a range of “top secret information” to Iranian agents “with the intent of harming national security” was sentenced Tuesday to 11 years in prison, prosecutors say.

The punishment handed down to Gonen Segev, a former infrastructure and energy minister, comes after he was tracked down in the African country of Equatorial Guinea last year and brought back to Israel to face trial.

"Segev confessed that he acted on behalf of the Iranian intelligence forces for five years, maintained regular communications with his handlers using a clandestine channel and that he provided them a diverse range of information -- including top secret information," prosecutors Geula Cohen and Rachel Aharoni Zeevi said in a statement, according to the Jerusalem Post.

SEGEV FOUND GUILTY OF FORGING DIPLOMATIC PASSPORT

"The indictment which Segev confessed to as part of the plea bargain included grave crimes of spying and providing information to an enemy with the intent of harming national security,” they added.

Segev was convicted in early January, but details on the case have been kept under wraps because of a gag order, the Jerusalem Post reports.

GERMANY ARRESTS LINGUIST, ACCUSES HIM OF PASSING MILITARY SECRETS TO IRAN

The newspaper, citing Channel 10 News, also says Segev told Shin Bet investigators following his arrest that he was trying to help Israel.

“I wanted to fool the Iranians and come back to Israel a hero,” Segev reportedly said, while insisting he did not hand over any classified information.

CLICK HERE TO GET THE FOX NEWS APP

But prosecutors claim he met with Iranian handlers in the Islamic Republic and other secret locations and provided them with information related to Israel’s energy industry and security sites, among other topics.

Shin Bet investigators say Segev first met with Iranian intelligence agents in Nigeria in 2012, where he was practicing medicine after having his license revoked in Israel, the Jerusalem Post reports. He also has been convicted in the past of trying to smuggle more than 30,000 ecstasy tablets into Israel from the Netherlands.