Honda is giving up its prestigious Formula 1 program to shift more resources into battery-electric and hydrogen fuel-cell tech.

The automaker unexpectedly announced Friday that it would withdraw from F1 at the end of the 2021 season. Honda currently supplies hybrid powertrains—mandatory in F1 since 2014, and referred to as "power units" in the sport—to Red Bull Racing and its sibling team, Alpha Tauri (formerly known as Toro Rosso).

"Honda needs to funnel its corporate resources in research and development into the areas of future power-unit and energy technologies, including fuel-cell vehicle and battery EV technologies, which will be the core of carbon-free technologies," a press release from the automaker said, also mentioning a corporate goal to achieve carbon-neutral operations by 2050.

Honda has been an on-again, off-again participant in F1 since the 1960s, both with its own teams, and as an engine supplier to other teams. Its latest stint began in 2015 with McLaren (with which it dominated F1 in the latest 1980s), but quickly fell apart as both Honda's hybrid power units and McLaren's chassis proved uncompetitive.

After moving to Red Bull and Alpha Tauri/Toro Rosso, Honda achieved more success. Honda-powered cars won three races in 2019, and have won two so far in 2020.

The automaker said it remained committed to motorsports, but made no mention of the all-electric Formula E series, which might be a logical next step. Honda confirmed Saturday a multi-year extension to its IndyCar engine program, including supplying hybrid powertrains beginning in 2023.

Honda has always been an engine company, so Formula 1 has been a good outlet for showing off its internal-combustion prowess. Its transformation to electric has been somewhat more hesitant than that of other automakers perhaps for that reason.

Earlier this week, Honda showed a sleek SUV coupe electric vehicle concept for China. 

Honda said that model isn't bound for the United States, but two vehicles are set to arrive starting in 2024 and co-developed by General Motors as part of a wide-ranging partnership between the two automakers.

That partnership includes fuel cells, but GM has backed away from using the tech in passenger vehicles, instead aiming to use it in commercial trucks and military vehicles.

Meanwhile, Honda leases the excellent Clarity Fuel Cell in California, but it's very limited by the infrastructure.

Honda has said that it's aiming to favor hybrid models over battery-electric cars (or even plug-in hybrids) in the U.S., which could leave it with a diminishing share of the market.