A suicide bomber killed a Turkish guard in what U.S. officials called a terrorist attack on the U.S. Embassy in Ankara on Friday, but current and former diplomats credited increased security with preventing more deaths.

Turkey, a key NATO ally, blamed the assault on a leftwing militant group with roots in the Marxist movements of the 1970s and a history of attacks on Turkish and U.S. security targets.

There was no immediate indication of a link either to al-Qaida or to militants in neighboring Syria. But analysts said the group, identified by Turkish officials as the outlawed Revolutionary People's Liberation Party-Front, or DHKP/C, has received protection and help from within Syria.

A U.S. official briefed on the bombing said there is no reason to doubt that the attack was launched by DHKP/C. But the official said investigators are considering whether the bombing was motivated by the Syrian civil war.

Friday's attack, shortly after 1 p.m., was the second fatal assault on a U.S. diplomatic mission in the last five months, and came on Hillary Rodham Clinton's last day as secretary of state. "We live in very complex and even dangerous times, as we saw again just today at our embassy in Ankara," Clinton told State Department employees in her final address Friday. Later in the day former Sen. John Kerry was sworn in to replace her.

Unlike the mob assault in Benghazi, Libya, the lone Turkish attacker, who was wearing a suicide vest, was unable to get farther than a checkpoint at the far perimeter of the compound, some distance from the embassy building.

The explosion killed the Turkish guard closest to the bomber, but two other guards were protected by bulletproof glass, State Department spokeswoman Victoria Nuland said.