The nation's major oil-producing states and Senate Finance Committee Chairman Russell B. Long (D-La.) won an easy victory yesterday as the Senate, pushing toward approval of its oil tax bill on Monday, agreed to exempt state oil royalties from the levy.

A 65-to-28 vote rejected an amendment by Sen. John C. Danforth (R-Mo.) that would have applied the tax to royalty payments that state and local governments receive from production of oil on lands that they own.

Although the issue created as much emotion as any other in the month-long debate over the tax, the prospects for Danforth's proposal -- shaky from the start because of Long's vehement opposition -- all but vanished when opposing factions agreed late Friday on an overall tax that would yield about $178 billion by 1990.

The final form of the tax, which would be levied against the extra billions that oil producers will get from President Carter's gradual decontrol of crude oil prices, will be hammered out in a House-Senate conference after the Senate completes its action.

The House has approved a much stronger version that would produce an estimated $277 billion by 1990. The eventual compromise is expected to top $200 billion, which is less than the administration wanted but substantially more than the $138 billion levy initially proposed by the Senate Finance Committee.

The White House has said it will be pushing the conferees to settle on the high side, and Senate leaders, including Long, have indicated they want a bill that the president can sign.

The big breakthrough Friday came when oil state and consumer state negotiators agreed to a $23 billion tax on various categories of oil that have previously been exempted from the levy, including newly discovered oil. This had the effect of raising the Senate bill's total of $178 billion, and Long predicted yesterday that no further additions or subtractions would be made.

In its unusual Saturday session, the Senate plowed slowly through a series of proposed amendments, many of them involving tax credits for energy conservation, with Majority Leader Robert C. Byrd (D-W. Va.) holding out hope until late in the day that the bill could be wrapped up last night.

However, as night approached he said it would have to go over until Monday, when remaining major amendments, including a tax break to small savers, are expected to be approved.

Long said he thought the conference could complete its work before Christmas. Byrd has said he would call the Senate back during the holidays if Congress doesn't complete work on both the tax bill and Chrysler Corp. relief legislation before it recesses Dec. 21 or 22.

Few major issues in the tax fight drew more talks -- and fewer votes -- than Danforth's bid to add an estimated $10.5 billion to the levies by applying the tax to the billions of dollars that a few states receive annually in royalties from oil produced out of state-owned lands.

Swooping down on the proposal like an avenging angel in the cause of the Constitution, states rights, fair play and the Louisiana state treasury, Long spoke for hours about it over the last several days, leaving the impression that he'd filibuster the amendment if it wasn't tabled.

Yesterday's vote did indeed table, or kill, it. Long's cause was helped by a number of disparate factors, including timely scheduling that brought the issue to a head just as the Senate was emerging from a three-day filibuster on the minimum-tax proposal and begining to think it might get a full Christmas recess after all.

Even some consumer-state, tough-tax senators peeled off, joined by coal-state senators who feared coal royalties might be taxed next and by Chrysler-state senators anxious to get action on their proposals this week to prevent the auto company's collapse.

With the bulk of an estimated $33 billion in annual royalties going to only four states, one of Danforth's main arguments was that they would benefit unduly at the expense of the country as a whole, positioning these states to wage "economic warfare" against consumer states.

Sen. John Tower (R-Tex.) called that the "biggest bunch of balderdash" he'd ever heard and an act of "regional animus." Sen. J. Bennett Johnston (D-La.) said it was unfair to pick on states like Louisiana that were only now "climbing out of the economic bondage of Reconstruction." Sen. Max Baucus (D-Mont.) said it would herald a "second war between the states." Long accused Danforth of advocating a "land and resources redistribution scheme by plundering the states of their own natural resources . . . a system of revenue-sharing in reverse."

If that wasn't bad enough, Sen. Alan Cranston (D-Calif.) said Danforth would actually be giving more money to the big oil companies, without any public gain, because a shifting of revenues from the states to Washington would only assure that the tax is phased out sooner than expected.

Danforth was obviously in for such a vote-thrashing that several senators rose to praise his tenacity, at the least. Danforth "fought a good fight for his amendment," said Majority Leader Byrd, even though it was "unwise, unnecessary and unconstitutional."

Among Washington area senators, only Charles McC. Mathias (R-Md.) voted against killing the Danforth proposal.

Meanwhile, one possible obstacle to consideration of the Chrysler bill appeared out of the way. When Sen. Lowell Weicker (R-Conn.), who sharply critized Byrd's leaderhip in a speech last week, objected to a routine parlimentary move by Byrd to put the bill on track for this week, Byrd crossed the Senate aisle to shake Weicker's hand in a peace gesture. They agreed to try to solve their procedural differences on Monday. Weicker said he wanted extensive debate on the Chrysler measure but denies he plans a filibuster.