(Bloomberg) — Nigeria’s House of Representatives passed a bill governing the country’s energy sector after the Senate did so in May, taking Africa’s top oil producer one step closer to a much-awaited overhaul of the key industry.

The Petroleum Industry Governance Bill now awaits President Muhammadu Buhari’s signing to become law.

The bill will “promote openness and transparency in the industry by clarifying the rules, processes, and procedures that govern the oil and gas sector,” Senate President Bukola Saraki said in a statement Thursday. “After nearly two decades of back-and-forth, near-misses and ‘near-passages’, the 8th National Assembly finally reached a milestone.”

Delays in passing the new laws created a climate of uncertainty that has cost the country as much as $15 billion a year in lost investment, the Petroleum Ministry has said. Lawmakers still need to pass two more pieces of legislation to complete an overhaul that will replace current laws. One focuses on new oil taxes and the other seeks to address longstanding grievances by oil-producing communities in the Niger River delta.

Saraki promised to pass those “very soon.” He said in June that they would be enacted by last month. However, the two remaining draft bills will be more difficult to pass, according to Cobus de Hart, an analyst at NKC African Economics near Cape Town.

Disagreements over how oil proceeds should be disbursed among Nigeria’s different states represent “one of the reasons why the original petroleum industry bill failed,” he said in emailed note. “Abuja will have to tread carefully with changes to the fiscal regime so as not to discourage investment in a sector which is already plagued by elevated security risks.”

Nigeria, Africa’s top oil producer, holds an average 55 per cent stake in joint ventures run by Royal Dutch Shell plc, Exxon Mobil Corporation, Chevron Corporation, Total SA and Eni. These account for about 80 per cent of total oil production, which generates at least two-thirds of government revenue.

The West African country pumped 1.68 million bbls/d of crude in December, according to its oil ministry, and is yet to reach full capacity of 2.2 million daily following disruptions caused by militant attacks from 2016.