In a ruling that could set a precedent for responsibility in maritime pollution, a French court ruled yesterday that the oil company Total was partly liable for the vast spill in 1999 from the tanker Erika, that blackened the Brittany coast with fuel oil even though the company did not own the ship.

The court fined Total almost $298 million in damages, most of which will be paid to the French government, various regional governments and several environmental groups.

In its ruling, the first of its kind in France, the court also recognized the principle of ecological harm “resulting from an attack on the environment.” That cleared the way for coastline communities to seek more money in damages from Total over the wreck of the decrepit tanker Erika.

The Erika, carrying 20,000 tons of heavy fuel oil, split in two in the Bay of Biscay on Dec. 12, 1999, after setting sail from Dunkirk in rough seas. The spill was spread by a storm two weeks later, fouling 250 miles of the French coast.

The ruling may give hope to coastal communities everywhere affected by oil spills.