Last July a tanker heading to Port Arthur, Texas, wasn’t responding to navigation commands to slow down.

The crew aboard the Singapore-owned tanker tried to restart the main engine but weren’t able to regain steering. They ultimately threw down an anchor, bringing the vessel to a stop half an hour later.

Poor fuel quality caused the main engine to fail and auxiliary engines to wear down, according to an incident report viewed by The Wall Street Journal.

Several ships over the past few years have experienced blackouts or engine failures at and near ports around the world. One culprit: contaminated fuel.

“It’s a malaise for the industry,” said Subhangshu Dutt , a former ship captain and founder of Om Maritime, which owns the tanker that had problems off the Texas coast last year.

It isn’t yet known whether contaminated fuel contributed to the Dali cargo ship accident in late March. After departing the Port of Baltimore, crew reported the ship lost power and its engine failed before its crashing into the Francis Scott Key Bridge .

Analyzing the fuel is among several lines of inquiry as safety investigators piece together the ship blackout’s cause, investigators have said. The National Transportation Safety Board, which is leading the accident probe, is also interviewing crew, reviewing maintenance records and studying data from the ship’s recorder, a less sophisticated version of an airplane’s black box.

The NTSB will test the quality of marine diesel the ship used and search for potential contaminants, said agency Chair Jennifer Homendy . Engine failures can result from issues beyond fuel, such as the malfunction of key electrical systems.

The maritime industry has long grappled with how to ensure fuels don’t ground massive ships and global trade flows. Problems can stem from crews not properly switching onboard fuels. They could also be the result of suppliers tampering with products to pad profits.

‘Cappuccino’ problem

Filling up a giant ship with fuel is more complicated than taking a passenger vehicle to the gas station. The refueling process can take hours. Crews toggle between fuels based on a ship’s location, often switching to a cleaner-burning, diesel-like fuel in and around U.S. and European ports.

While at sea, ships run on thick, tar-like residual fuel oil—made from the stuff left over in crude refining when more valuable products have boiled off. Residual fuel oil contains more impurities than gasoline and higher volumes of noxious substances like sulfur.

Some contaminants that shipping firms worry about occur naturally in oil or get into fuel during the refining process. Many vessels have onboard purifiers, which like giant salad spinners rotate thousands of times a minute to remove impurities before fuel gets injected into the engine.

Shipowners and brokers said they can rely on quality fuel coming from major ports such as Houston, Rotterdam or Singapore, but that they have to be more circumspect in smaller ports.

One contamination method that emerged in the 1980s and has been hard to stamp out is called “cappuccino.” The practice involves pumping oil into a ship’s tank with compressed air, creating a layer of foam. When the fuel is measured for volume the foam stands a few inches higher than the liquid below. The practice enables suppliers to pump in less fuel.

In more dangerous instances, suppliers who are eager to plump up profits sometimes blend shipping fuel with liquids such as used car lubricants, paraffin or industrial waste.

“It’s a very cheap way to get rid of something that’s difficult to get rid of,” said Nigel Draffin , an industry consultant who previously managed refueling operations for oil giant Shell ’s fleet of vessels. The fuel supplier benefits by unloading materials that are expensive to deal with and providing a smaller amount of fuel than what customers are paying for.

Authorities in Singapore, a marine refueling hub, have prosecuted companies tampering with fuels. While so-called cappuccino in fueling is less prevalent today, shipowners said it still happens in ports. Oversight of ship refueling isn’t as stringent as the heavily-regulated market for jet fuel in airplanes.

“You will end up from time to time buying stuff that doesn’t have the quality you expected,” said Hugo De Stoop , former chief executive of Euronav, owner of one of the world’s biggest tanker fleets.

Fuel resupply problems don’t occur consistently but can affect a large number of ships when they do.

In early 2022 , about 80 ships in Singapore reported issues with their fuel pumps and engines after receiving contaminated residual fuel oil. Investigators found that Glencore had sold some of the tainted fuel to another supplier, and the two had offered it to about 200 ships, the country’s port authority said at the time. It said the fuel was loaded on a tanker at a Middle East port.

Chlorinated hydrocarbons, which cause problems in ship engines and other onboard machinery, contaminated the fuel, according to the agency. Even though the fuel passed certification standards, the checks didn’t require testing for those compounds, it said. The agency suspended Glencore ’s bunkering license for two months. Glencore declined to comment.

Earlier this year, another testing firm, Viswa Lab, issued alerts that it found compounds that could damage ship machinery in fuels supplied in places including Hong Kong, Singapore and Houston.

Dali investigation

It could take several months before investigators confirm the cause of the Dali accident. A preliminary report from the NTSB could be released as soon as this month.

Some shipping executives said that a diesel-driven blackout for the Dali is unlikely because the fuel is less likely to have contaminants than heavier oil used on the open sea.

Since late December, the Dali dropped anchor at about a dozen ports and stopping-off points in the Middle East and Asia as well as at the Panama Canal, data from analytics firm MarineTraffic show. The ship visited New York and the Port of Virginia before departing the Baltimore port. The Dali was roughly an hour into a voyage to Sri Lanka when it crashed.

Synergy Marine Group operated the Dali and A.P. Moller-Maersk chartered the vessel. Synergy Marine didn’t respond to questions about the investigation.

Maersk typically supplies fuel to vessels it charters, fuel oil traders said. It couldn’t be determined whether that was the case with the Dali.

“We are closely following the investigations conducted by authorities and the vessel operator as well as conducting our own investigation,” a Maersk spokesman said.

Write to Costas Paris at costas.paris@wsj.com , Weilun Soon at weilun.soon@wsj.com and Joe Wallace at joe.wallace@wsj.com