THOUGH EGYPT is still ruled by its military and is months away from electing a democratic government, its foreign policy already has undergone a remarkable change. Last week the regime oversaw a reconciliation between the Palestinian Fatah and Hamas factions — a deal its diplomats brokered without consulting Israel or the United States. In an interview with The Post’s Lally Weymouth, the foreign minister of the interim civilian cabinet, Nabil Elaraby, confirmed that Cairo will end the previous regime’s blockade of the Gaza Strip and move toward normalizing relations with Iran.

“Egypt has turned a page with every country in the world,” Mr. Elaraby said. “If you want me to say it — Iran is not an enemy. We have no enemies. Anywhere.”

Such words are bound to be disconcerting to the Israeli government — which has rejected the Palestinian accord — and to some in Washington accustomed to Egypt’s role as a close partner of the United States in containing Iran and steering Israeli-Palestinian negotiations. Statements by Mr. Elaraby and Amr Moussa, the former head of the Arab League who leads the early polls for the upcoming presidential election, suggest that Egypt and the United States may soon part ways on such issues as whether sanctions are the right response to Tehran’s nuclear ambitions. In a separate interview, Mr. Moussa told Ms. Weymouth: “The nuclear issue in the Middle East means Israel and then Iran.”

There’s nevertheless a case for concluding that Egypt’s policy changes may end up benefiting the United States and Israel. First, both Mr. Elaraby and Mr. Moussa said that Egypt will keep its peace treaty with Israel and continue close relations with Washington. It will still support the goal of a peaceful two-state solution in the Middle East, as well as a new one: democratic change in the Arab world.

Egypt’s previous foreign policy was often toxic. It opposed international initiatives on democracy and human rights, and it joined efforts in the United Nations to stigmatize Israel. It regularly made promises to Washington on which it failed to deliver — such as its attempts to broker cease-fires between Israel and Hamas. Meanwhile the United States was commonly blamed for Egypt’s domestic repression as well as its external weakness.

A more independent Egypt will have the opportunity to regain its traditional role of Arab leadership — at the likely expense of Iran and allies such as Syria. If it can appropriate some of the leverage those regimes now have over Hamas, Cairo may be able to push the movement toward the concessions that would be essential to any Middle East deal. It could also be a force for ensuring that the tide of democratic change is not reversed by the remaining dictatorships — whether they be Syria or Saudi Arabia.

The Palestinian accord, which remains unsettled in many respects, could be an important test of Egypt’s new path. The accord is likely to have some big negative consequences, such as the end of the progressive Palestinian administration in the West Bank. But the Obama administration should press Egypt to show that its new policy can deliver results — such as a definitive end to attacks on Israel and the release of an Israeli soldier abducted by Hamas. The former Egyptian government failed for five years to free that hostage; if Mr. Elaraby can spring him, he can prove that Egyptian diplomacy is back.