CAIRO — Secretary of State Hillary Clinton met with Egyptian President Mohamed Morsi Saturday in a fresh push to strengthen relations as Egypt enters an unpredictable era in which an untested political Islam is clashing with a secular military over control of the nation.

Clinton’s talks with Morsi signaled a stark contrast to the days when U.S. diplomats visited President Hosni Mubarak, a stalwart American partner on countering terrorism and preserving Egypt’s peace treaty with Israel.

With Mubarak toppled by popular revolt last year, Washington is recalibrating its approach to a new Islamist president suspicious of American designs on the Middle East.

Clinton focused on calming the intensifying power struggle between Islamists — Morsi and the Muslim Brotherhood — and the army, which seized control after Mubarak’s ouster and is intent on retaining authority.

Clinton stressed support for Morsi, Egypt’s first freely elected president, and is expected to meet today with Field Marshal Mohamed Hussein Tantawi, the country’s top military commander.

“Democracy is hard,” Clinton said after her meeting with Morsi. She added that “it requires dialogue and compromise and real politics. So we are encouraged and we want to be helpful, but we know that it is not for the United States to decide. It is for the Egyptian people to decide.”

The trip by Clinton comes as the Obama administration is trying to keep pace with months of regional upheaval. Egypt has been key to U.S. policy since the 1970s, but there is sharpening concern in Washington that new Islamist leaders in Tunisia and Egypt gradually will chart a different course.

Egypt’s foreign policy is not likely to change dramatically in the short term, and it has promised to respect its 1979 peace treaty with Israel.

The battle between Morsi and the military has put the U.S.in a sensitive predicament that critics say is layered with irony and hypocrisy:

Washington is urging that Morsi’s vision of political Islam respect civil liberties. At the same time, the U.S. is giving the Egyptian military, which has been subverting the nation’s transition to democracy, more than $1.3 billion in annual aid. The military wants to limit the reach of Islamists and has promised to guard the Israeli peace treaty.