TEL AVIV—A former Israeli minister pleaded guilty to spying for the country’s bitter enemy Iran and faces an 11-year prison sentence, in a case that has gripped the public as Israel tries to thwart Tehran’s attempts to entrench on its border.

Gonen Segev, a former energy and infrastructure minister, admitted to espionage and passing sensitive information to Iran, Israel’s Ministry of Justice said Wednesday. A plea deal was reached after a monthslong closed-door trial and Mr. Segev’s sentencing has been set for Feb. 11.

In May, Israeli authorities arrested Mr. Segev—who served in Yitzhak Rabin’s Labor-led government during the mid-1990s—and accused him of being an active agent for Iranian intelligence.

Israeli said Mr. Segev made contact with the Iranians through their embassy in Nigeria in 2012, and since then twice visited Iran. He was arrested after he attempted to enter Equatorial Guinea and was transferred to the Israeli police at their request.

Tensions between Israel and Iran have run high for many years. Israel accuses Iran of seeking its destruction, while Iran claims Israel has assassinated its scientists to stem Tehran’s nuclear program.