Anheuser-Busch has a long history of finding creative ways to move beer. It was the first company to use refrigerated rail cars in the 1870s. Much more recently, it shipped 50,000 cases of beer 120 miles using a self-driving semi truck.

Today it announced an order for up to 800 semi trucks powered by hydrogen gas as part of a bid to make its entire fleet of long-haul trucks run on "clean energy."

The hydrogen trucks are being built by Nikola Motor Company. The name Nikola just happens to be the first name of Nikola Tesla, the same Serbiain-born inventor the Tesla (TSLA) car company is named after.

Last year, Anheuser-Busch placed an order for 40 Tesla plug-in semi trucks.

The two companies weren't originally competitors, until Tesla unveiled its entry into the semi business in November, 2017. Nikola recently filed suit against Tesla accusing the carmaker of stealing Nikola's designs. Tesla has publicly denied the charge.

But Anheuser-Busch isn't staging a contest between the two trucks. Both will manage different parts of the beer's journey said Ingrid DeRyck, Anheuser-Busch's vice president for sustainability.

Anheuser-Busch delivers Bud in self-driving truck

The Nikola and Tesla trucks both run on electricity. But instead of storing power in battery packs, the way Tesla's semis do, the Nikola trucks have tanks of compressed hydrogen gas. The gas is fed into hydrogen fuel cells where it's combined with oxygen from the air in a process that produces water as well as electricity to power the truck.

Nikola's hydrogen-powered trucks have considerably higher range than Tesla's battery-powered semis. They can go anywhere from 500 to 1,200 miles on full tanks, depending on driving conditions and load, according to Nikola. Tesla's long range trucks can travel only 500 miles on a full charge.

And since they run on compressed gas, Nikola's trucks can also refill in just 20 minutes, or about the same time it takes to fill the big tanks on a diesel-powered semi truck, said Nikola CEO Trevor Milton. Tesla has said its trucks will be able to charge for as much as a 400 mile drive in 30 minutes.

Anheuser-Busch orders Tesla semi trucks

The beer brewer plans to cut its overall greenhouse gas emissions by 25% by 2025, she said, and these trucks will play a big part in that. Anheuser-Busch declined to say how much it has agreed to pay for Nikola trucks.

The biggest challenge for hydrogen vehicles is finding places to refuel them. To solve that problem, Nikola sells fueling networks along with its trucks. As part of its deal with Anheuser-Busch, Nikola will build 28 fueling stations strategically placed around the country to serve the beer company's distribution routes. The stations will also be available to other drivers of hydrogen powered cars, Milton added.

Nikola says it will build about 700 fueling stations over the next seven years. Hydrogen doesn't exist naturally as a free-floating gas, and must be separated from substances such as water or natural gas. The hydrogen for Nikola's trucks will be created using only renewable energy sources such as solar or wind power, the company said.

Anheuser-Busch hopes to have all 800 trucks in its fleet by 2020, but the beermaker will begin testing the first pre-production semis later this year, said Milton.