Perth's entire fleet of 474 gas buses will be taken off the road for modifications under a State Government agreement with maker Mercedes-Benz over a spate of bus fires.
Mercedes-Benz and bus body builder Volgren Australia agreed to do and fund the work over the next 18 months.
In exchange, the Public Transport Authority will drop legal action against the firms.
The nature of the modifications and the cost were not disclosed but come after extensive testing and trials.
The PTA launched its Supreme Court writ a year ago, claiming the gas OC500 LE buses were unsafe for passengers and people nearby.
It claimed the buses did not meet safety, design or longevity standards and that Mercedes, Volgren and supplier Evobus were negligent and breached their duty of care in designing and building buses that were not "reasonably safe".
The writ, which was never served, also claims Mercedes breached its contract and with Evobus engaged in "misleading and deceptive conduct".
There were three major fires on the OC500 LE buses in Perth between December 2012 and March last year, taking the total to 14 in five years.
No one was seriously hurt and the buses still operate after the PTA developed engine-bay modifications, including better fire suppression.
The OC500 LE runs on compressed natural gas and operates only in Perth and Sydney.
The buses joined the Transperth fleet in 2005 and carry about 35 million passengers a year.
PTA spokesman David Hynes said the fires led to detailed technical investigations in Australia and overseas.
He said Mercedes-Benz and Volgren agreed to carry out the modifications on every gas-powered bus and the PTA would allow the writ to lapse.
Then transport minister Alannah MacTiernan has said she was "locked in" when Labor won government in 2001 to using Mercedes-Benz as the supplier under a contract with the previous government for diesel Mercedes buses.
"We were concerned about using diesel, particularly in the inner-city, and wanted to use gas instead," she said.
Mercedes-Benz said it could deliver high-quality gas buses.