* Gazprom says 12.5 bln euros needed for domestic upgrade
* Earlier said 16 bln for sections under sea, land in Europe
* New gas spat between Russia and Ukraine flares up (Adds detail, analyst comments)
MOSCOW, Jan 29 (Reuters) - Russian group Gazprom said it will have to spend 510 billion roubles ($16.9 billion) upgrading its domestic gas pipeline system for the planned South Stream undersea link to Europe, increasing the project's cost.
The overall cost for South Stream - pipes going under the Black Sea to bypass Belarus and Ukraine through which Russian gas exports to Europe currently need to travel - is now seen at 29 billion euros ($39 billion).
Russia's gas export monopoly had previously estimated the cost of South Stream at 16 billion euros.
Disputes over gas prices between Russia and Ukraine in the winters of 2006 and 2009 led to stoppages in exports to Europe, which gets over a third of its gas from Russia.
The dispute flared up again over the weekend when Ukraine said Gazprom had hit it with a $7 billion bill for alleged arrears under a long-term contract.
Construction of South Stream, with an offshore section stretching 900 kilometres under the Black Sea, began on Dec. 7.
The official launch of gas flows is scheduled for late 2015 at an annual pace of 15.75 billion cubic metres, with full capacity of 63 bcm set to be reached in 2018 when all four parallel lines are set up.
Many analysts have questioned the need for South Stream, saying Gazprom should concentrate on talks with Ukraine, the company's second-largest customer after Germany.
The project has also been losing appeal as gas demand has been falling in Europe where exports of Russian gas last year fell 8 percent to 138 bcm.
Citi analysts said South Stream would unlikely reach its planned capacity should there be agreement with Ukraine. "We still doubt the full line will be built. Rather, we think the first, 15 bcm line will be built, but that a deal with Ukraine will obviate the need for the three follow-on lines," they said in a research note on Tuesday.
Gazprom said the bulk of investment in its domestic pipeline, 232 billion roubles, will be spent raising the capacity of a trunk line from Ukhta in northern Russia to Torzhok, 230 kilometres north of Moscow.
Gazprom's South Stream partners - French utility EDF , German firm Wintershall and Italian group Eni - will pay half the cost but not including the domestic upgrade. ($1 = 30.18 roubles = 0.7429 euro) (Reporting by Vladimir Soldatkin; Editing by Jane Baird and Dan Lalor)