WASHINGTON — The election of an Islamist president in Egypt is turning longstanding U.S. policy in the Mideast inside out: The Obama administration is relieved that the candidate representing three decades of close partnership with the United States lost.
The United States is now set to embrace a religious-based former opposition leader who does not share many U.S. goals, perhaps including the 30-year peace with Israel upon which U.S. policy in the region is based. The embrace won’t be warm, and for the administration it will come with strings attached.

Still, the administration is calling the election of Mohammed Morsi on Sunday a milestone in the transition to democracy.
Morsi, from the formerly banned fundamentalist Muslim Brotherhood group, is the first Islamist president of Egypt. He defeated Ahmed Shafiq, ousted President Hosni Mubarak’s last prime minister, in a tight race that deeply split the nation.
Now Morsi faces a daunting struggle for power with the still-dominant military rulers who took over after Mubarak was forced out in last year’s Arab uprising.
The U.S. mostly had held the Muslim Brotherhood at arm’s length in deference to Mubarak and long has eyed with suspicion the party’s emerging positions on Israel, women’s rights and religious freedom. The Muslim Brotherhood has said it would seek changes to Egypt’s 1979 peace treaty with Israel without canceling it. Morsi said in his first televised speech that he would preserve Egypt’s international accords, a reference to the peace deal with Israel.
Despite reservations, the Obama administration is relieved that Morsi won without unleashing a new wave of violence and unrest, and without provoking a military coup.
Morsi was popularly elected, and the freedom of the election is more important than who won it, U.S. officials said.
“We look forward to working together with President-elect Morsi and the government he forms to advance the many shared interests between Egypt and the United States,” White House press secretary Jay Carney said Monday. “We judge individuals and parties that are elected in a democratic process by their actions, not by their religious affiliation.”
“Our commitment to the revolution that began in Egypt ... is to a process that provides for a transition to democracy that is transparent,” Carney said.
Deep concern that violence might erupt Sunday when the winner of the runoff was announced ebbed Monday as the United States, Israel and other nations assessed what the outcome portends.
“We want to see President-elect Morsi take steps to advance national unity, to uphold universal values, to respect the rights of all Egyptians, particularly women, minorities (and) Christians,” State Department spokeswoman Victoria Nuland said.
U.S. officials said the administration is ready to send a senior official to Cairo to meet in person with Morsi and members of his government once his Cabinet is assembled and Washington is assured that the military has turned or will turn over power to the new president. Officials said full diplomatic recognition by the United States is likely once Morsi is inaugurated. The officials spoke on condition of anonymity because plans for Morsi’s inauguration were not final.