Edmund Blair CAIRO — A newcomer to international affairs, Egyptian President Mohamed Morsi has so far shown skill in moving Egypt back toward the center of regional diplomacy and setting out his own foreign policy, without upsetting the Americans or the Gulf states. His trip to Iran, the first by an Egyptian leader since the 1979 revolution, could have upset ties with Washington and Gulf Arab capitals, yet seems to have reassured them because Morsi criticized Iran's ally Syria robustly when in Tehran. A military campaign in Sinai to crack down on militants who killed 16 Egyptian border guards on Aug. 5 drew complaints from Israel about the use of heavy armor close to its border. But that early test of ties passed off fairly smoothly and Morsi, who took office on June 30, reaffirmed Egypt's commitment to the peace treaty with Israel, reassuring the United States which had backed his ousted predecessor Hosni Mubarak. It is a delicate path he is treading to prove how Egypt has changed under a president who rose to power under the Muslim Brotherhood, a group opposed to Israel and with which Washington only opened formal ties last year. As he moves to re-establish Egypt at the heart of regional diplomacy, Morsi cannot afford to alienate traditional allies in the West or the wealthy Gulf, whose financial support he needs to steady his nation's ailing economy. “He is playing a delicate balancing act in that he is giving different things to different sides and it has been quite impressive for someone who isn't tested on the world stage," said Shadi Hamid of the Brookings Doha Center. “He is turning out to be a strong figure and that is the way he is carrying himself on the regional and international stage," he said of the president, the son of a peasant farmer who secured a scholarship to study in the United States. Dismissed as the “spare tire" during his election campaign because he was the Brotherhood's second choice candidate, 61-year-old Morsi has quickly consolidated his position at home by clawing back powers from the military, whose generals had tried to limit the president's role before he came to power. Bold moves at home have been mirrored abroad, notably by his attendance on Aug. 30 at the Non-Aligned Movement (NAM) summit in Tehran. Diplomatic ties with Iran were broken after Egypt's 1979 peace deal with Israel and Cairo and Tehran have not had full ties for three decades. Morsi's Tehran visit, though only a few hours long and ostensibly to hand over the NAM presidency to Iran, would have been unimaginable under Mubarak and marked a sharp break with the past. It was watched closely by the West and in the Gulf, both wary of Iran's nuclear ambitions. Sitting next to Iranian President Mahmoud Ahmadinejad who has rallied behind the Syrian government, Morsi referred to the “oppressive regime" in Syria and said it was an “ethical duty" to support rebels trying to bring it down. Some Iranian state media, apparently trying to hide the incident, scrubbed out the Syrian reference in translation. “We were very reassured and impressed with the robust line," said one Western diplomat. “It is a sign of a certain assertiveness and confidence in Egyptian foreign policy which comes from having a democratically elected president." Gulf diplomats appeared equally comforted. One ambassador in Cairo said his country was not worried by Morsi's trip because he went to hand over the NAM presidency but added: “The most important thing was President Morsi gave a strong speech." As part of that bid to put Egypt back at the heart of the region, Morsi has proposed Saudi Arabia, Turkey, Iran and Egypt form a quartet to help solve the Syria crisis. While Iran backs Damascus, the others want President Bashar Al-Assad to quit. — Reuters