© Dan Peled/AAP PHOTOSAmpol will continue operations at its fuel refinery in Brisbane following government funding.
Fuel providers Ampol and Viva Energy will retain their refineries at Brisbane and Geelong after the federal government pledged funding to ensure fuel is produced in Australia.
The energy providers said their refineries would continue until at least mid-2027 as long as the government funding of about $2.3 billion is provided.
The refineries are the only two left in Australia. Competition from Asia has prompted fuel manufacturers to stop production and import the goods.
Prime Minister Scott Morrison said the funding was a matter of economic and national security amid the pandemic.
Ampol last year began examining whether to continue its refinery or import fuel.
The operation had a full-year loss of $145 million in earnings before interest and tax.
Video: Businesses want commitments on climate change announced in Fed. Budget (ABC NEWS)
Viva's Geelong operation had a full-year loss of more than $200 million.
Chief executive Scott Wyatt said the government's funding was not designed to support profits but would reduce the risk of low profit margin cycles.
The funding includes payment for producing fuel when margins fall below the levels needed to avoid loss. These payments are set to begin from July 1.
Mr Wyatt said Australian refineries were exposed to factors such as low margin cycles which were outside their control.
The government will also require refineries to have a minimum amount of stock that can help run vehicles for 24 days.
The government is also fast-tracking its demand that refineries produce ultra-low sulphur gasoline to late 2024. This fuel is more environmentally-friendly.
Ampol shares were higher by 6.09 per cent to $27.51 at 1426 AEST.
Viva shares were up by 5.53 per cent to $2.10.