Daimler AG is quitting development of natural-gas powered trucks to pool resources for electric and hydrogen rigs that can advance its goal of offering a CO2-neutral fleet in its main markets by 2039.

The world’s biggest truckmaker is already working on battery-electric versions of a range of commercial vehicles, including the heavy-duty Mercedes-Benz eActros that’s set to start production in 2022. Tesla Inc. this week said it’s planning to start output of its electric semi in limited numbers next year.

“Natural gas engines are fossil fuel-based and therefore a transition technology on the road to a CO2-neutral transport,” Daimler truck chief Martin Daum said Friday in a prepared speech at a conference in Berlin. It makes little sense to “spend a lot of money on something that does not have a long-term future, when we can use that money much better elsewhere.”

Hydrogen-powered vehicles should be available by the end of the next decade, Daimler said.

The truck industry, just like automakers, is under pressure to clean up its vehicles, leaving manufacturers struggling with high costs. Still, there’s little choice but to meet increasingly stringent regulation and a global push to address climate change.

“Especially when it comes to climate change, we’ve seen that things can’t continue like this, and we as the auto industry are part of society and because of that have the obligation to to do something about it,” Porsche Chief Executive Officer Oliver Blume said Friday at a conference in Stuttgart.

For truckmakers, paying for the transformation is getting harder with a downturn in the truck cycle taking hold as the global economy softens. That’s offsetting a boom in transportation demand fueled by online shopping.

Daimler’s sprawling commercial vehicle operations, including the Freightliner nameplate in North America, Mercedes-Benz trucks in Europe and Fuso in Asia, face long-standing criticism for trailing profitability at competitors like Volvo Group. Daimler this year turned the division into a largely independent legal entity to make it more agile and nimble, as part of a broader corporate overhaul.

Daum has intensified efforts to cut costs to channel funds toward new technologies. The unit started series production of an electric city bus last year and its Fuso brand just showed a fuel-cell prototype vehicle at the Tokyo Motor Show in Japan.

“Truly CO2-neutral transport only works with battery-electric or hydrogen-based drive,” Daum said. “This can only be achieved if competitive conditions for CO2-neutral transport are created for our customers in terms of costs and infrastructure.”