More than nine decades after legendary General Motors CEO Alfred Sloan famously pledged to offer "a car for every purse and purpose," GM is set to ditch internal combustion engines for an electric future.

Once derided in a documentary for killing the electric car when it abandoned a before-its-time model called the EV1, GM plans to make only electric vehicles at some point in the future.

The move marks another critical blow to the future of gasoline and diesel cars, which are facing pressure from foreign regulators seeking to slash emissions and will soon face stiff competition as electric-car prices fall.

Electric vehicles powered either by batteries or hydrogen fuel cells will ultimately represent GM's entire global lineup, Mark Reuss, product development chief, said Monday.

More:Volkswagen, Mercedes-Benz launch electric cars: 'anything Tesla can do, we can do better'

More:Nissan turns over new Leaf, but the electric car's range is an issue

More:Used electric cars: the best bang for your buck?

"General Motors will move humanity forward in the future with all-electric propulsion," Reuss said. "Because General Motors believes the future is all electric, these aren’t just words in a war of press releases. We are far along in our plan to lead the way to that future world."

Reuss declined to specify a year for the transition away from gas and diesel vehicles, saying GM is too large to say exactly when the switch would be complete.

The company also announced plans to introduce two new electric vehicles within the next 18 months after delivering the first mass-market electric car with the Chevrolet Bolt, which goes 238 miles on a single charge and costs $37,500 before tax incentives.

GM said it would deliver at least 20 new electric vehicles globally by 2023.

The plan comes amid a global shift in focus as regulators emphasize electric vehicles, battery costs fall and hydrogen fuel cell technology advances.

China, GM's biggest vehicle market, has signaled plans to ban gasoline vehicles, and Britain and France have announced similar plans.

So GM might not have much of a choice, Autotrader.com analyst Michelle Krebs said.

"If they’re still going to be a global player, they’ve still got to move ahead" even if the Trump administration rolls back fuel economy standards in the U.S., Krebs said.

Meanwhile, other automakers have made similar pledges. Chinese-owned Swedish brand Volvo recently announced plans to make only hybrids or electric vehicles after 2019.

GM will begin selling fuel cell-powered cars to retail customers in 2023, fuel cell chief Charles Freese said Monday. Fuel cells have fascinated the auto industry for years because their only emission is water. Cost and limited availability of hydrogen fuel have kept them from hitting the mainstream so far.

GM said it had created a new system that allows the company to fit different types of battery cells into a vehicle's underpinnings, speeding the development of future electric vehicles.

The company also previewed an ambitious fuel cell layout that puts hydrogen tanks and other mechanical systems between the axles and frame rails of a heavy-duty pickup. GM called the platform SURUS (Silent Utility Rover Universal Structure).

It featured 4-wheel drive and steering and could be used as the basis for autonomous delivery trucks or emergency vehicles.

Contributing: Detroit Free Press auto critic Mark Phelan

Follow USA TODAY reporter Nathan Bomey on Twitter @NathanBomey.