Oil prices declined on U.S. markets and held steady overseas yesterday, ending the year down by as much as $1.40 a barrel from levels at the close of 1986.

Analysts said trading was listless prior to the long New Year's weekend.

The price of oil traded on world markets has dropped by more than $2 a barrel since the Organization of Petroleum Exporting Countries failed to take measures to curb runaway production and halt discounting at its winter meeting that ended Dec. 14.

The 13-nation cartel simply extended its current production quotas and $18-a-barrel benchmark price through June 1988.

On the New York Mercantile Exchange, West Texas Intermediate -- the principal U.S. crude for immediate delivery -- lost 19 cents yesterday to $16.70 a barrel.

On the final trading day of 1986, West Texas intermediate ended at $17.94 a barrel in a prolonged rally triggered by OPEC's mid-December agreement to reduce production in order to drive up world oil prices to its official $18-a-barrel target.

West Texas intermediate hit a high for the year of $22.75 a barrel in mid-July and then began to weaken as OPEC greatly exceeded its production ceiling.

On the U.S. Gulf Coast spot market, where oil is sold to the highest bidder, West Texas Intermediate plummeted by 50 cents to $16.70 a barrel and was 80 cents below the close of $17.50 at the end of 1986.

Unleaded gasoline for January delivery on the Merc lost 0.03 cent to 43.67 cents a barrel. But home-heating oil bucked the downward trend on U.S. markets and gained 0.26 cent to 51.44 cents a barrel.

On the European spot market, the United Arab Emirates' Dubai light -- the key OPEC crude from the Middle East -- was unchanged at $15.10 a barrel. But Dubai light was selling for $1.40 less than its closing price of $16.60 a barrel at yearend 1986.

Britain's North Sea Brent crude for February delivery showed no change at $17 a barrel but was down 75 cents from $17.75 a barrel on the last trading session of 1986.