CAIRO — Egypt is charting a new course in its foreign policy that has already begun shaking up the established order in the Middle East, planning to open the blockaded border with Gaza and normalizing relations with two of Israel and the West’s Islamist foes, Hamas and Iran.

Egyptian officials, emboldened by the revolution and with an eye on coming elections, say that they are moving toward policies that more accurately reflect public opinion. In the process they are seeking to reclaim the influence over the region that waned as their country became a predictable ally of Washington and the Israelis in the years since the 1979 peace treaty with Israel.

The first major display of this new tack was the deal Egypt brokered Wednesday to reconcile the secular Palestinian party Fatah with its rival Hamas. “We are opening a new page,” said Ambassador Menha Bakhoum, spokeswoman for the Foreign Ministry. “Egypt is resuming its role that was once abdicated.”

Egypt’s shifts are likely to alter the balance of power in the region, allowing Iran new access to a previously implacable foe and creating distance between itself and Israel, which has been watching the changes with some alarm. “We are troubled by some of the recent actions coming out of Egypt,” said one senior Israeli official, citing a “rapprochement between Iran and Egypt” as well as “an upgrading of the relationship between Egypt and Hamas.”