Swedish sailors fired warning shots with a cannon, a machine gun and a sniper rifle early Tuesday to thwart the attack on the M/V Antonis. The pirates fired a grenade launcher, but Swedish navy spokesman Anders Grenstad says no one was injured in the attack.
He says the crew of the Swedish corvette HMS Malmo boarded one of the fishing vessels used by the pirates, but a second pirate boat escaped.
Seven people were detained by the Swedes, who also seized weapons and a GPS navigation system.
Two Swedish navy ships are patrolling the pirate-infested waters off Somalia as part of an EU flotilla.