The pirates were apprehended by staff from the HMS Malmö as they attempted to board a Greek cargo vessel halfway between Yemen and Somalia.
HMS Malmö was ordered to respond to a distress signal sent out shortly before 1.30am by the M/V Antonis. The cargo ship's crew said they had come under rocket-propelled grenade fire from two boats manned by pirates.
When the Swedish crew arrived at the scene the pirates were attempting to board the merchant vessel.
HMS Malmö fired warning shots at the pirates using cannons, machine guns and sniper fire in a bid to halt the attack, the Swedish military said.
When the pirates attempted to flee, the HMS Malmö took up the chase, focusing on one of the boats. After around twenty minutes, the pirates gave up and a Swedish crew was dispatched to board the pirates' fishing boat.
Seven men were handcuffed and taken on board the Swedish corvette. The boarding crew also seized two handguns, a GPS navigator and a grappling hook.
The pirates were to be taken to Djibouti on board the HMS Malmö, where
further instructions would be issued by the European Union's NAVFOR-Atalanta
An agreement between the EU and Kenya stipulates that pirates arrested by EU forces are to be taken to Kenya to face trial.
Swedish naval forces began patrolling the Gulf of Aden on May 15th. The Navy's primary task is to watch over the transportation UN food aid to Somalia, though general marine supervision is also included in the force's mandate.
The Swedish naval force consists of the HMS Stockholm, HMS Malmö and the support vessel Trossö and is made up of 152 personnnel.