The Atlantic Richfield Co. has agreed to a $22.5 million out-of-court settlement in a major California price-fixing case, the first victory in a 10-year struggle by the state to get a better price for oil taken from public lands.

The suit, filed in 1975, contended that Atlantic Richfield as well as Texaco, Union, Shell, Chevron (formerly Standard of California), Mobil and Exxon underpaid the state and local governments for oil taken from the public lands.

State controller Kenneth Cory, who has pursued the issue since he was a state legislator, said a mass of documents in the case scheduled for release Friday will show motorists "were right" in having "a queasy feeling that they were being had" at the gasoline pump.

Cory said the state lands commission, which he chairs, had offered to settle with all seven companies for a total of $256 million, but only Atlantic Richfield accepted. If the suit goes to trial, still at least a year away, and the oil companies lose, they would be liable for more than $900 million in trebled damages and court costs.

"We are prepared to prove that these companies systematically conspired to set arbitrarily low prices for state crude oil," he said. "They knowingly rigged the marketplace for their own private purpose, and deprived the taxpayers of California of many millions of dollars."

But an Atlantic Richfield spokesman said the company had done nothing wrong and was only settling to close the issue and save on future legal costs. The company has already spent more than $20 million defending itself and considers the $22.5 million settlement close to what it would have paid in future legal fees.

"We believe that the charges are without merit and that our legal defenses are valid," said Atlantic Richfield General Counsel Francis X. McCormack.

"There was no wrongdoing by Atlantic Richfield, but we looked at the time, money and effort that would still be required, and decided to settle."

Robert W. Parkin, attorney for the city of Long Beach, which is trustee for some of the richest publicly owned oilfields in the state, said the oil companies paid $1 a barrel less than what the state felt was the market price of more than $3 a barrel for state crude in the early 1970s. Cory said he feels the current price paid for state oil, about $24 a barrel, is still $3 a barrel too low.

Cory said the state had spent about $20 million in the last 10 years preparing for trial. He said investigators have collected records, depositions and experts' testimony showing the oil companies pooled their crude oil supplies and transport facilities to set a low price for the oil they purchased from the state. Then, he said, they "established complex marketing devices which concealed the price-fixing" and kept independent refineries from benefitting from the same low prices.

Cory and Parkin announced the settlement details following a morning appearance here before U.S. District Judge William P. Gray.

On Friday, thousands of company documents filed in the case are to be released as the result of a lawsuit filed in 1982 by The Wall Street Journal. The companies had persuaded the court to keep the documents sealed until now on the grounds that they contained valuable trade secrets.

"After pursuing this matter for a decade and a half, I feel vindicated," said Cory. "We never had any question whether we could show these companies conspired . . . but when we would have the chance to show precisely how they did it, and how much it cost."