WASHINGTON (AP) _ U.S. Marine guards killed three Liberian gunmen and wounded another today in exchanges of fire at an American embassy compound in Liberia, U.S. officials said.

Two senior defense officials, speaking on condition of anonymity, said one of the American soldiers was slightly grazed in the exchange, possibly by a cartridge being ejected from his own weapon.

At the State Department, spokesman Nicholas Burns said the three were killed in three separate assaults on the embassy compound, but the attackers' identity was not known. The attacks followed the breakdown of a cease-fire that had kept the West African country's dueling factions apart since April 19.

``This is a very grave incident,'' Burns said. ``We call upon all parties, all factions, all militia members in Monrovia, not only to cease and desist fighting in general but to be very careful not to attack Americans and not to attack the U.S. Embassy.''

The exchange took place at ``Post 7,'' a guard post near the U.S. ambassador's residence in Monrovia, Pentagon spokesman Kenneth Bacon said.

The Marine who was grazed did not require medical attention.

``There's been fairly intense fighting going on for the last several days between the factions, but this is the first exchange of fire involving the Marines,'' Bacon said. ``We don't know what (the attackers) were aiming at. Fire came in and it was returned.''

Both Bacon and senior defense officials who spoke on condition of anonymity said they believed two of the attackers were killed and one was wounded. Bacon noted that the information was in a preliminary report.

The exchange of fire grew from a general and intense street battle going on in Monrovia today. Firing among rival factions apparently drew close to the embassy compound and eventually involved shooting in the direction of the Marines.

Marines guarding the compound are part of a reinforced rifle company. The company's personnel are among 276 Marines on the ground in Monrovia dispatched from a much larger Marine Expeditionary Unit afloat offshore. That force comprises 2,939 Marines, Bacon said.

When Navy, Marine and Air Force personnel are included, the total U.S. military presence in or near Monrovia is 3,444, mostly Marines. The main function of the military deployment _ evacuation of U.S. citizens and other foreign nationals from the dangerous street fighting _ has been accomplished. Marines were guarding a skeleton embassy staff and the largely evacuated U.S. property in Monrovia.

Assistant Secretary of State George Moose is in Monrovia trying to negotiate a cease fire among the warring factions.

State Department spokesman Burns said he did not know where Moose was during the firefights.

``The way to end these problems is to reach a peace agreement between the factions in Monrovia,'' Bacon said. ``The first lesson is that the factions should stop fighting. The second is that the Marines take their security obligations seriously.''