Egypt is open to importing gas from Israel, its oil minister said in state-owned media on Wednesday, according to Reuters.

Egypt is going through its worst energy crisis in decades and is seeking fresh sources of natural gas, which powers most of its homes and factories, including Algeria, Russia, and Cyprus.

But importing gas from Israel is more controversial. Despite a peace treaty between the two countries, popular mistrust of Israel runs high among Egyptians.

Oil Minister Sharif Ismail said gas imports from Israel were a possibility, when asked in an interview by the state-owned Al Mussawar magazine.

“Anything can happen. Whatever achieves the best interests of Egypt, and of the Egyptian economy and the role of Egypt in the region... That will determine the decision to import gas from Israel,” he said. Companies are already negotiating to bring Israeli gas to Egypt, but any deals will hinge on approval from Cairo.

While many Egyptians still view Israel with suspicion, relations have improved since the army toppled President Mohammed Morsi, an Islamist member of the Muslim Brotherhood, in 2013 after mass protests against his rule.

Egypt, which once exported gas to Israel and elsewhere, has become a net energy importer over the last few years. The government has attempted to improve the energy landscape by slashing subsidies, paying down its debt to foreign energy firms, and negotiating import agreements.

An agreement on natural gas between Israel and another one of its neighbors, Jordan, has been met with controversy as Jordanian lawmakers expressed their opposition to it.

U.S. giant Noble Energy announced in September that Israel would supply Jordan with 1.6 trillion cubic feet of natural gas from its Leviathan offshore field over a period of 15 years.

A week after the deal was announced 40 Jordanian parliamentarians submitted a memorandum the deal not go through. The issue came up again in Jordan’s parliament last month, after 79 lawmakers in the 150-seat house filed a motion calling for it to be scrapped.

Jordan's main opposition Islamist party has threatened to take legal action against anyone in the kingdom who signs the controversial gas deal with Israel.

Though Jordan has a peace treaty with Israel, the country’s parliament, which is made up mostly of Islamists, remains anti-Israel and its members have more than once called to annul the peace treaty.