The prize yesterday was about $2 billion that oil producers must forfeit for overcharging customers for crude oil during the 1970s.

The issue was which group of politicians would get hold of the money. On one side was Rep. John D. Dingell (D-Mich.), chairman of the House Energy and Commerce Committee, carrying the banner of the Congress. He wanted the $2 billion to flow through his committee into the U.S. Treasury to help reduce the budget deficit.

On the other side were the serried ranks of oil refiners and marketers, airlines, truckers and other victims of oil overcharging, and governors and attorneys general of the 50 states, who wanted the money.

It was no contest.

Dingell, a powerful House veteran, does not lose often.

Yesterday, however, Republicans and oil state Democrats combined to reject Dingell's bid to claim for the government at least $1.7 billion in future restitution payments.

The pressure on Congress to boost federal revenue is compelling. But in this case, the greater political push came from the states -- particularly those whose budgets have been battered by falling oil prices, and the other would-be recipients of overcharge funds, congressional aides said.

The glue that held this coalition together was a negotiated settlement of the overcharge issue approved July 7 by U.S. District Judge Frank G. Theis of Kansas.

Lawyers representing more than 40,000 states, localities, companies, other organizations and the Department of Energy had agreed to a division of present and future payments in the overcharge cases, ending years of litigation.

The claims arose from the federal oil-price controls, which were in effect from the 1973 oil embargo until 1981, when President Reagan abolished the regulations. The controls established price ceilings on oil from various types of wells and exempted other kinds of wells. The government has demanded restitution from producers who sold oil for more than the regulations allowed.

Oil companies have been assessed several billions of dollars thus far, led by Exxon Corp.'s $2.1 billion penalty in January, but some 400 cases still were pending at the beginning of the year.

For House members struggling with deficit reduction, the oil overcharge penalties beckoned like a pot of gold.

Like other committees, Dingell's panel faced unpalatable cuts in programs dear to members' hearts -- funding for Medicare, Medicaid, the National Institutes of Health and Amtrak, for instance. But those cuts could be fended off if Dingell's committee could get hold of the overcharge payments.

The House Budget Committee initially told Dingell's committee to recover $2.45 billion in overcharge funds. Following the compromise in Theis' court, the target was lowered to $1.7 billion for fiscal 1987 through fiscal 1989. Dingell's committee then proposed to turn over $750 million of the $1.7 billion over to the states, to mollify them, aides said. State governments could use the funds to pave roads, build jails, or any other purpose.

To no avail. "We did our best and it didn't work," said a House staff member. Although the issue could be brought up before the full House, Dingell's committee won't tackle it again.