DAMASCUS — Four men shouting religious slogans tried to blow up the U.S. Embassy in Damascus on Tuesday, but their car bomb failed to go off and Syrian security guards killed three of them in a shootout.

The Syrian Interior Ministry said the fourth attacker was wounded and captured during the incident, which it called a "terrorist attack."

A member of Syria's anti-terror squad was killed, the Syrian Arab News Agency said, and 14 people were wounded, including another Syrian anti-terror operative, a Syrian guard at the embassy, a local member of the embassy staff and passers-by.

A Chinese diplomat also was hit in the face by shrapnel and slightly injured while standing on top of a garage at the Chinese Embassy, China's government news agency said.

The attackers apparently did not breach the high walls surrounding the embassy's white compound in the city's diplomatic neighborhood. At the embassy, as at most American embassies worldwide, a local guard force patrols outside the compound's walls while U.S. Marine guards are mostly responsible for guarding classified documents and fighting off attackers inside the compound.

Witnesses said the gunmen had tried to throw hand grenades into the embassy compound, shouting "Allah Akbar!" or "God is great!" It was not clear if any of the grenades made it over the high walls.

"I saw two men in plain clothes and armed with grenades and automatic weapons," said Ayman Abdel-Nour, a Syrian political commentator who was in the area. "They ran toward the compound shouting religious slogans while firing their automatic rifles."

The Rawda area where the attack occurred is one of the most heavily guarded districts in the Syrian capital. It houses security installations and the homes of government officials.

Hours later, the area remained sealed, with sharpshooters deployed on rooftops and top security officials at the scene.

Interior Minister Bassam Abdel Majid told state television an investigation was under way.

Security officials said the assailants' arsenal included rocket-propelled grenades. It was not known if they had fired them during the midmorning gun battle in central Damascus.

Nabil Samman, who heads the Center for Documentation and Research, a Damascus consultant, said that one car had exploded in front of the U.S. Embassy and that a second also drove up, though it did not explode.

"There are at least 100 police around the area," he said. People are very nervous."

The attack came at a time of high tension between the United States and Syria over the recent Israeli-Hezbollah war in neighboring Lebanon. In Damascus, the sentiment has become increasingly anti-American.

Syria is one of the main backers of the Lebanese group Hezbollah, which the United States considers a terrorist organization and which fought a 33-day war with Israel in Lebanon.

Secretary of State Condoleezza Rice publicly thanked Syria for its response during the attack.

Syria has seen previous attacks by Islamic militants. In June, Syrian anti-terrorism police fought Islamic militants near the Defense Ministry in a gun battle that killed five people and wounded four.

After the attack Tuesday, pools of blood lay splattered on the sidewalk outside the embassy, along with a burned car apparently used by the attackers. A sport utility vehicle with U.S. diplomatic tags had a bullet hole through its front window, and the glass windows of nearby guard houses also were shattered.

The embassy flag was flying at half- mast, one day after the fifth anniversary of the Qaeda attacks on the United States.

In Washington, a State Department spokesman confirmed the attack by "unknown assailants" but had few details.