Serbia is being offered a secure gas supply in return for its oil monopoly
Russia and Serbia have signed a controversial energy deal that will hand Russian gas giant Gazprom control of NIS, Serbia's oil monopoly.
Under the deal, Gazprom is to build a gas pipeline through Serbia and an underground gas storage facility there.
Russia's President Dmitry Medvedev and his Serbian counterpart Boris Tadic signed the agreement in Moscow.
The plan is for Serbia to host part of a new pipeline called South Stream, to deliver Russian gas to southern Europe.
Gazprom is taking a 51% stake in NIS for 400m euros (£380m; $560m), officials say.
Both countries signed an energy co-operation agreement in January, but the details have only just been finalised. Belgrade had delayed signing because a small party in Serbia's ruling coalition had argued that the terms on offer to Gazprom were too generous.
Critics say Russia's pledges to build South Stream by 2015 are not firm enough, given the current economic downturn.
South Stream is designed to take Russian gas under the Black Sea to Bulgaria and then to Serbia for transit towards the lucrative markets of southern Europe.
Washington and the European Union are backing a rival pipeline project called Nabucco, to bring gas from Central Asia, which would bypass Russia.
Correspondents say the planned pipeline could undermine the European efforts, which aim to reduce European dependency on Russian gas.
Serbia's energy diplomacy is complicated by the fact that Nabucco has EU backing - yet Serbia wants to join the EU.
Political tensions over Kosovo are also a complicating factor, with the EU supporting Kosovo's independence, while Belgrade and Moscow insist the territory remains part of Serbia.