WASHINGTON (AP) _ The Supreme Court, overturning a 136-year-old precedent in maritime law, ruled today that suppliers to ships can get help from the federal courts when they are not paid for their services.

The court unanimously reinstated a lawsuit in which Exxon Corp. is seeking payment from a shipping company for fuel it provided in 1983 to a ship docked in Jeddah, Saudi Arabia.

A federal appeals court, relying on an 1855 Supreme Court decision, had ruled that federal court ''admiralty jurisdiction'' did not extend to Exxon's claim.

Writing for the court today, Justice Thurgood Marshall said that old decision ''is incompatible with current principles of admiralty jurisdiction over contracts and therefore should be overruled.''

He added:

''Rather than apply a rule excluding all or certain agency contracts from the realm of admiralty, lower courts should look to the subject matter of the agency contract and determine whether the services performed under the contract are maritime in nature.''

An agency contract is one in which one company acts as an agent for another. In the case decided today, Exxon had acted as an agent of a company that had chartered the fueled ship.

Exxon provided fuel for the commercial liner, the Hooper. It is owned by Central Gulf Lines Inc. and was chartered by Waterman Steamship Corp. for service between ports in the United States and the Middle East.

For many years Exxon had supplied the steamship company with marine fuel.

Waterman Steamship declared bankruptcy in 1983 and did not pay Exxon for the fuel supplied to the Hooper.

Exxon then sued Central Gulf in federal court in New York, seeking payment or a lien on some Central Gulf property.

Lower courts ruled that Exxon could not sue under federal maritime law because it had acted as Waterman's agent, and the 1855 Supreme Court ruling barred federal court jurisdiction in such cases.

But today the high court said admiralty jurisdiction extends to Exxon's lawsuit.

''We express no view on whether Exxon is entitled to a maritime lien under the Federal Maritime Lien Act,'' Marshall wrote. ''That issue is not before use, and we leave it to be decided (by lower courts).''

The case is Exxon vs. Central Gulf Lines, 90-34.