Forces on the Marshal Shaposhnikov freed the captured tanker
Russia has released Somali pirates captured during the dramatic rescue of a Russian oil tanker earlier this week.
The Russian defence ministry said the gang was freed because of "imperfections" in international law.
Russia initially said the 10 pirates would be taken to Moscow to face criminal charges over the hijacking.
The Moscow University vessel was seized on Wednesday in the Gulf of Aden, off Yemen, as it sailed for China, carrying crude oil worth $50m (£33m).
Russian forces boarded the ship a day later, freeing the 23 Russian crew who had locked themselves in a safe room after disabling their ship.
One pirate was killed during the gun battle that ensued.
But the pirates were released because of "an incomplete international legal basis" to keep them detained, Col Alexei Kuznetsov was quoted by Russia's Interfax news agency as saying.
The UN Convention on the Law of the Sea, to which Russia is a signatory, gives sovereign nations the right to seize and prosecute pirates.
But some countries have been reluctant to do so because of concerns of what to do with the pirates after their jail terms are up.
Asked why Russia released the pirates, Col Kuznetsov told the Associated Press news agency: "Why should we feed some pirates?"
The Gulf of Aden is one of the world's busiest shipping routes, and the Russians, Europeans and Americans have all deployed navy forces in the region after a growing number of attacks by pirates on commercial vessels.
But suspected pirates are often released because they are not caught in the act, the BBC's East Africa correspondent Will Ross says.
The European Union's anti-piracy force said it had come across 50 groups of suspected pirates in the past couple of months. The young men, in small boats with weapons and ladders, were clearly not out on innocent fishing trips but in all cases their boats and equipments were destroyed and the men released after being disarmed, our correspondent reports.
There are more than 100 suspected pirates in custody, either awaiting, or already on trial in Kenya, which borders Somalia.
But the process is slow - lasting up to a year - and costly.
Kenya has said it wants to review agreements with the EU, the US, Britain, Canada, China and Denmark to prosecute pirates because some of the countries have failed to deliver on their promise of financial aid.
In the Seychelles, some 38 Somali men are awaiting trial in prison - making up 10% of the country's entire prison population.
Suspected pirates have also been taken to the US, France and the Netherlands, among others, for prosecution.
But unless an international solution is found, many more pirates will be released and the deterrent lost, our correspondent says.