WASHINGTON — An American pilot and a weapons officer were safely rescued in Libya on Tuesday after their warplane crashed near Benghazi, but the United States Marine Corps dropped two 500-pound bombs during the recovery and faced questions about whether Marines had fired on villagers.

In an episode that reflected the unpredictability of an air campaign designed to keep American troops off the ground, the United States military said that an equipment malfunction rather than enemy fire brought down the plane. A Marine Corps officer in the Mediterranean strongly denied that any shots were fired at civilians during the rescue, but Marine Corps officers at the Pentagon said they did not know what happened or whether any civilians were killed or injured when the bombs exploded.

United States military officials said the pilot was recovered by a Marine rescue team and was now aboard an American ship in the Mediterranean, the Kearsarge. The weapons officer was found on the ground by “the people of Libya,” said Adm. Samuel J. Locklear III, the tactical commander of the United States-led effort in the country. At a Pentagon briefing, Admiral Locklear did not describe them as rebels but made clear that they were not forces loyal to Col. Muammar el-Qaddafi.

Admiral Locklear said the people treated the weapons officer “with dignity and respect.” The officer is now in American custody, but the admiral declined to say more.