Panetta’s brief visit to Cairo, part of a week-long trip to North Africa and the Middle East including Israel, underscored the challenge Washington faces in recalibrating its policy towards Egypt.
For three decades, it strongly supported Mubarak, who repressed and marginalised Mursi’s allies in the Muslim Brotherhood.
But Mubarak’s overthrow last year in a popular uprising opened the door to elections that were swept by Islamists, unnerving Egypt’s neighbour Israel, Washington’s top ally in the region.
The main beneficiary was Mursi’s Brotherhood, which has a history of hostile rhetoric towards Israel and a conservative social agenda that sits uneasily with U.S. attempts to promote personal freedoms including the rights of women and religious minorities in the Middle East.
During a visit by U.S. Secretary of State Hillary Clinton to Egypt in mid-July, Mursi pledged to abide by Egypt’s international obligations, which include its 1979 peace treaty with Israel.
Egypt is also of strategic importance to the United States because of the Suez Canal, a vital conduit for trade and for U.S. military vessels.
Washington released its annual military aid for Egypt in March despite misgivings over its progress towards democracy, saying U.S. national security required continued military assistance.
The move followed the worst diplomatic spat between the two countries in years, which began at the start of the year when Egyptian authorities launched a crackdown on U.S.-funded pro-democracy groups.
Ties reached a low-point when several Americans were put on trial on charges of illegally funding local non-governmental organisations, but rebounded when the NGO workers were allowed to leave the country after a judge lifted a travel ban.