Ukraine’s parliament approved a law on Thursday intended to break monopolies and lure badly needed investment into the country’s lucrative but opaque natural gas sector.

Approved by a majority of almost two-thirds, the “natural gas market law” aims to boost competition and transparency in one of the most troubled sectors of Ukraine’s recession-battered and war-torn economy.

Described by one lawmaker as a “moment of truth” demonstrating parliament’s determination to break the longstanding hold of oligarchs over Ukraine’s politics and economy, the new law brings Ukraine’s gas market into line with the EU’s Third Energy Package, which aims to boost competition in the energy sector.

The legislation is also a key step in the Kiev leadership’s goal of loosening Moscow’s grip on the economy and strengthening economic ties with the EU.

“For 10 years we couldn’t get the vote through, but finally today we de-oligarchised and de-monopolised our country’s gas market,” said Arseniy Yatseniuk, Ukraine’s prime minister.

Under the legislation, Ukraine will unbundle the financially stretched state gas conglomerate Naftogaz into separate production, transit, storage and supply businesses. Running vast deficits due to past rent-seeking arrangements and subsidised gas sales to households, Naftogaz has been a huge drain on the nation’s cash-starved budget.

Its restructuring, along with recent gas tariff hikes towards market levels, are intended to boost transparency and are key conditions of a $17.5bn bailout granted by the International Monetary Fund in March.

“This law is an important step towards Ukraine’s integration with the European Union,” said Andriy Kobolyev, Naftogaz’s chief executive. “It transparently opens our natural gas market to investors.”

The government hopes the legislation will attract investors to help modernise and jointly operate the country’s vast natural gas pipeline, a key conduit for Russian gas supplies to European markets. The law also allows open market access for traders.

Ukraine has increased gas imports from EU markets in recent years, and hopes that more competition and closer energy ties with Brussels will help it further diversify away from years of dependency on costly imports from Russia.

Formerly a big trading partner and culturally close neighbour, Moscow is now seen in Ukraine as an “aggressor” for occupying Crimea last year and backing separatists controlling breakaway eastern regions.

In last-minute amendments to the law, MPs also imposed fees on companies holding monopolies in regional gas distribution, which they claim are controlled by oligarchs, including Dmytro Firtash, a former partner of Russia’s Gazprom, in supplying gas to Ukraine. Mr Firtash is currently in Austria, where he is on bail challenging extradition to the US on corruption charges, which he denies.

“This parliament is breaking the oligarchs’ hold. . . Let’s continue the offensive on the oligarchs,” said Yury Lutsenko, head of the pro-presidential faction, ahead of the vote.

Thursday’s vote came days after the Ukraine prosecutor’s office announced it would seek to cancel what it described as three “rigged” privatisations of electricity utilities conducted under Viktor Yanukovich, the Moscow-backed president ousted by last year’s Maidan protests.

In one of the transactions, Rinat Akhmetov, Ukraine’s richest oligarch and a former political ally of Mr Yanukovich, acquired a controlling stake in Dniproenergo, one of the country’s largest thermoelectric generators. In a statement, Mr Akhmetov’s DTEK energy holding insisted the acquisition was legal and pledged to counter any property rights challenges in court.