But added provisions, including one that could give the Dangote Group an effective monopoly on fuel, launched last-minute battles in Africa's largest oil exporter.
The senate added a measure that would only allow companies with active refining licences to import fuel. Import volumes would also be linked to the amount of oil they refine.
Currently 23 companies have refining licences, according to the Department of Petroleum Resources. Most process less than 12,000 barrels per day (bpd). The Dangote refinery, under construction in Lagos by billionaire Aliko Dangote, has a nameplate capacity of 650,000 bpd.
Fuel marketers and the Trade Union Congress warn the measure would give an effective monopoly on fuel in West Africa's largest consumer.
In a joint statement, the two primary fuel marketers' associations, Moman and Dappman, said it would stifle price competition and kill off small businesses in the downstream sector.
"It hinders the country's financial and economic progress because it transfers a huge chunk of public wealth to favoured businessmen," the Trade Union Congress said.
Dangote spokesman Anthony Chiejina said the government was pursuing the same policy to encourage Nigerian oil refining that it had with cement. Nigeria has largely banned cement imports for 20 years to encourage local production.
"It's an economic policy that has been tried and tested and has worked," Chiejina said.
Nigeria produces and exports cement, but the World Bank said in 2016 that cement prices in Africa are 183% higher, on average, than world prices.
An amendment would create a frontier exploration fund and direct to it 10% of rents on petroleum mining and prospecting licences and 30% of state oil company NNPC Limited's oil and gas profit. It is unclear how much profit NNPC, a company saddled with many costs, including fuel subsidies, has.
"Frontier" basins are concentrated in northern Nigeria. Under Buhari, NNPC has undertaken a variety of exploration campaigns, but not commercially developed any discoveries.
The Southern Governors Forum and a string of southern oil-producing community groups have spoken against the funding level. The Pan Niger Delta Forum called it "provocative" and "wasteful."
KPMG has said promoting frontier basin exploration is "commendable", but that the government should ensure that exploration was only "undertaken in areas that are potentially commercially viable."
Delta communities where oil is produced are fighting for a 10% share of annual operating expenditure of companies in their territory; the house approved 5%, and the senate 3%.
Pollution has decimated some producing communities, which have little economic development and endemic poverty. Communities say a bigger share of oil and gas cash is the least the country can do.
Critics say the government has already channelled billions for regional development, with little progress. NNPC chief Mele Kyari warned that too large a stake would drive big oil companies out of Nigeria.
Observers say these battles are unlikely to derail, or even significantly delay, passage.
"There is clearly very high political will in the legislature, in both chambers, to get this done," said Amaka Anku, head of Eurasia Group's Africa practice, adding that the ruling party has a strong majority in both chambers.
Reuters, the news and media division of Thomson Reuters, is the world's largest multimedia news provider, reaching billions of people worldwide every day.Go to: https://www.reuters.com/