"Eventually the pirates surrendered and a boarding team from the Marshal Shaposhnikov arrived on board the tanker, captured all the pirates and freed the crew. All the crew are safe and well," an EU naval statement said.
A spokeswoman for the tanker's owner, Novorossiysk Shipping Company, said the crew survived the 20-hour siege by hiding in a safe room that was inaccessible to the hijackers.
Russian investigators said that the captured 10 pirates would be transferred to Moscow to face charges.
"The investigation is taking steps to transport the captured pirates to Moscow," the investigative committee of Russia's prosecutor general office said in a statement.
It said they would face "criminal responsibility" for the hijacking and the investigation would be conducted in accordance with Russian and international law.
The International Maritime Bureau (IMB) said recently the presence of numerous foreign warships in the Gulf was proving an effective deterrent, with 17 attacks there in the first quarter of 2010, down from 41 a year earlier.
However, the pirates are still able to seize ships in the busy shipping lanes linking Europe with Asia and have spread their attacks further out to sea in recent months.
Russia has been sending warships to patrol and protect Russian crews and cargo off the Horn of Africa since the hijacking of the Ukrainian-owned cargo ship MV Faina and the death of its Russian captain in 2008.
Some oil tankers have taken to sailing around southern Africa and further east into the Indian Ocean away from Somalia's coastline to avoid the Gulf of Aden.