Giant cargo boats and US navy warships have been successfully powered on oil derived from genetically modified algae in a move which could herald a revolution in the fuel used by the world's fleets – and a reduction in the pollution they cause.

The results of substituting algal oil for low-grade, "bunker" fuel and diesel in a 98,000-tonne container ship are still being evaluated by Maersk, the world's biggest shipping company, which last week tested 30 tonnes of oil supplied by the US navy in a vessel travelling from Europe to India. Last month, the navy tested 20,000 gallons of algal fuel on a decommissioned destroyer for a few hours. Both ran their trials on a mix of algal oil – between 7% and 100% – and conventional bunker fuel.

"The tests are not complete yet, but we had very few problems," a Maersk spokesman said.

Collaboration between the world's two biggest shipping fleets is expected to lead to the deployment of renewable marine fuels. Maersk uses more than $6bn of bunker fuel a year for its 1,300 ships, and the US navy, the world's biggest single user of marine fuels, burns around 40m barrels of oil a year. The navy plans to test more ships on algal fuel next year as part of its "green fleet" initiative and has pledged to cut 50% of its conventional oil use a year by 2020. Maersk hopes to achieve similar cuts in the same time.

"Shipping takes 350m tonnes of oil a year and causes 3-4% of all greenhouse gas emissions, so it is very attractive to find alternatives. We can envisage [the world's] ships being 10% or more powered by biofuels in 20 years' time," Jacob Sterling, the Maersk head of climate and environment, said.

The exact nature of the algae, one of 30,000 single-cell organisms known to exist in the wild, is a secret closely guarded by Solazyme, the company that manufactures the fuel in giant fermentation tanks in Pennsylvania. The fast-growing algae are fed crop or forest waste and convert their sugars to oil.

"The technology is there. The question now is how to scale up," Tyler Painterm, the chief finance officer of Solazyme, which has a contract to produce 450,000 gallons of biofuels for the navy's trial, said. "We have tested thousands of algae, found in swamps, in mountains and at sea and we know we can be competitive. By using different strains of algae, we can produce different kinds of oils."

The company, which is set to expand shortly with a 50m gallon-a-year plant in Brazil, is backed by the oil company Chevron, the giant US agribusiness Bunge, and Sir Richard Branson, whose Virgin airline has tested planes on algal fuel.

Unlike early biofuels, which made transport fuel from food crops, the new "second generation" process uses only plant waste and does not displace foods which could be fed to people or animals. Nevertheless, immense amounts of feedstock would be needed to power the world's ships. Maersk estimates it could take the crop waste of an area half the size of Denmark to completely power its ships.

But even a partial switch to algal oils would massively reduce air pollution. Bunker fuel, which is little more than asphalt, can produce as much pollution from a single ship in a year as 50m cars and is the most polluting fuel in the world.

But there is uncertainty over how much algal fuels would reduce greenhouse gas emissions. Algae sequester CO2 when growing, but release it when burned as oil. Solazyme and Maersk claim they reduce carbon emissions by 80% compared with petroleum-derived fuels in a "lifetime" analysis.

The race is on between different companies to produce competitive algal oils. In October 2010, the US Navy purchased 20,055 gallons on algae biofuel at $424 per gallon, but by December 2011, the price had reduced to $26.67 per gallon. Meanwhile, Craig Venter, the scientist who first sequenced the human genome and designed the first synthetic cell, is trying to develop a genetically-engineered algae fuel that depends only on sunlight and sea water and can be grown and harvested at sea.

In an interview in this month's Scientific American, he said: "We need three major ingredients: CO2, sunlight and seawater, aside from having the facility and refinery to convert all those things. We're looking at sites around the world that have the major ingredient. To us, this is a long-term plan."

If the US navy does switch to algae or other biofuels, it would mark the end of an era of oil-burning navies ushered in by Winston Churchill. In 1911, as the British navy minister, he controversially ordered the huge British fleet to switch from coal to oil for efficiency.

Two years later, he bought a 51% controlling interest in the then small Anglo-Persian Oil Company for the UK government. Within a few years, the company changed its name to BP, and is now the world's fourth-largest corporation.

• Get the Guardian's environment news on your iPhone with our new app. You can also join us on Twitter, Facebook and Google+