Attackers set off a bomb next to a wall of the US Consulate in the eastern Libyan city of Benghazi Wednesday, the State Department said, causing no casualties.
The blast underlined the unstable security situation in Libya, more than seven months after the death of deposed dictator Moammar Gaddafi.
It came two weeks before the country is scheduled to hold its first post-Gaddafi national elections.
The State Department said that there were no injuries. It said the bomb "exploded at a perimeter wall."
State Department spokesman Mark Toner said the US has asked Libya to step up security around American installations. "We deplore the attack on our diplomatic mission in Benghazi," he said. "We've seen reports from one group claiming responsibilities for this attack, but there's an investigation right now by the government of Libya, so we'll let that play out."
Libya's news agency, Lana, quoted a security official as saying the bomb was probably locally made.
Violence and disorder has plagued Libya since Gaddafi was captured and killed last October after an eight-month civil war.
The transitional leadership based in the capital of Tripoli has failed to impose its authority on much of the oil-rich North African nation. Instability has only increased as cities, towns, regions, militias and tribes all act on their own, setting up independent power centers.
Eastern Libya, where the uprising against Gaddafi began, has been especially restless. Its residents complain they were ignored by Gaddafi, and they charge that the interim rulers still favor the Western part of the country, where Tripoli is located.
On Tuesday, a militia briefly occupied the country's main airport outside Tripoli with armored vehicles and automatic weapons, forcing airport authorities to divert flights to an air base.
The fighters said that they were protesting the abduction of their commander. The government regained control of the airport after several hours.
The country is preparing for elections June 19, when Libyans are set to choose a 200-member assembly that will form a panel to write a new constitution and pick a new government.
Election commission and government officials have recently given contradictory statements about the possibility that the elections might be delayed, given the fragile security situation in Tripoli and other cities.
Some in the east have called for a boycott of the election, demanding more representation.