A car bomb exploded outside the Swedish consulate in the eastern Libyan city of Benghazi on Friday, damaging the front of the building and nearby houses, but no casualties were immediately reported.
The bomb exploded a day after Libya's Prime Minister Ali Zeidan was briefly abducted by a group of former rebels.
Nobody claimed responsibility for attack, which took place days after a U.S. special forces' raid captured a Libyan al-Qaida suspect in Tripoli, outraging Islamist militants, who called for revenge attacks.
The Swedish Foreign Ministry said none of its staff had been injured. "The facade and windows were damaged but no staff was injured. The consulate is closed on Fridays," Foreign Ministry spokeswoman Ursula Ahlen said.
Libya is deep in turmoil two years after the fall of Moamar Gadhafi, with its central government and nascent army struggling to control rival militias and Islamist militants who have turned the vast North African country into a safe haven.
On Thursday, former rebels now on government payroll kidnapped Zeidan from the hotel where he stays in the capital Tripoli, saying the government has been informed in advance of the U.S. raid. They later released him unharmed after a few hours.
Zeidan, who is under pressure from Islamists and ordinary Libyans for failing to deliver on public services since Gadhafi's overthrow, avoided any criticism of his captors. To help maintain security, Libya's government relies on militias made up of thousands of Libyans who took up arms against Gadhafi. But these rival groups have often involved into security threats themselves. This is especially true for Benghazi, where the 2011 revolt began and where the U.S. ambassador was killed during an Islamist assault on a U.S. diplomatic mission a year ago.
The city, where many demand autonomy from Tripoli, has seen a string of attacks on foreign missions and companies as well assassinations of army and police officers.
Several countries have closed their consulates there since the killing of the U.S. ambassador.