The EU forces were transported by helicopter to the bases near the port of Haradhere, a well known pirate lair.
Anti-piracy forces have been reluctant to attack mainland bases, fearing for the crew of captured ships.
They are believed to be holding about 17 ships and 300 crew.
The latest incident involves the Greek-owned oil tanker Smyrni which was hijacked in the Arabian Sea last week.
The Liberian-flagged tanker carrying 135,000 tonnes of oil is reported to be heading for Somalia.
The overnight raid on Somali pirate bases is small but significant. This is the first time since the EU set up its naval patrol force off Somalia in Dec 2008 that it has taken the fight to the pirates’ home base.
The idea, says the EU, is to disrupt the pirates’ business model and upset their logistics.
Naval officers say there were no casualties on either side but if raids like this are repeated – as they probably will be – the pirates are likely to adapt their operations making it harder for their equipment to be destroyed without also hitting local Somalis.
The EU recently agreed to expand Operation Atalanta to allow forces to attack land targets as well as those at sea, and this is the first time its forces have used the new rules to attack a base on the mainland.
The attack was carried out overnight and, according to the European forces, no Somalis were hurt during the action.
The multinational forces used helicopters in conjunction with two warships to leave five of the pirates’ fast attack craft “inoperable”.
The European naval mission issued a statement saying: “The focused, precise and proportionate action was conducted from the air and all forces returned safely to EU warships on completion”.
A spokesman added that the operation was carried out with the full support of the Somali government after extensive surveillance, and the aim was to deny the pirates a safe haven onshore.
Bile Hussein, a pirate commander, told the Reuters news agency that speed boats, fuel depots and an arms store had been targeted.
“They destroyed our equipment to ashes. It was a key supplies centre for us,” Mr Hussein said.
“The fuel contributed to the flames and destruction. Nothing was spared.”
Military vessels from Nato countries, the US, China, Russia, Japan and India are also involved in patrolling an area of ocean which is about the same size as western Europe.
Two decades of war in Somalia have left the country without a fully-functioning government making it hard to deal with piracy.
The transitional government controls the capital Mogadishu, but al-Shabab militants hold many southern and central areas of the country.”
Source: BBc News