(Adds quotes and details)

ANKARA (AFP)--The prime ministers of four European Union countries and Turkey signed here Monday a deal to build a major gas pipeline reducing European reliance on Russian supplies.

Prime ministers Recep Tayyip Erdogan of Turkey, Sergey Stanishev of Bulgaria, Emil Boc of Romania, Gordon Bajnai of Hungary and Austrian Chancellor Werner Faymann inked the intergovernmental deal, a landmark in the long-delayed Nabucco pipeline project, amid uncertainty on who will supply the gas.

European Commission chief Jose Manuel Barroso also took part in the signing ceremony.

Erdogan said the legal framework for the construction of the pipeline would be completed once the Nabucco consortium signs separate agreements with all five participant countries within a targeted period of six months.

"The more steps we take [on realizing the project], the more the interest of supplier countries will grow," he said.

Azerbaijan is seen as the primary potential provider of gas for the conduit, with Turkmenistan, Iraq and Egypt also mentioned for the long term.

The 3,300-kilometer Nabucco pipeline is planned to become operational in 2014 at an estimated cost of EUR7.9 billion, with a capacity to pump 31 billion cubic meters of gas from the Caspian Sea to Austria via Turkey and the Balkans, bypassing Russia.