Six of the eight owners of the Trans-Alaska Pipeline have agreed to cut their rates and refund $500 million as part of a government-approved settlement to complaints they were overcharging by billions of dollars for shipping oil through the system.

The settlement, approved Wednesday by the Federal Energy Regulatory Commission, resolves the major portions of an eight-year-old dispute among the oil companies who built and own the 800-mile pipeline, the Justice Department and the state of Alaska over the rates for moving 1.6 million barrels of oil through it daily.

The state and federal governments complained that the rates, some in the range of $6.20 per barrel, charged by the pipeline owners would decrease oil production from Alaska's North Slope and Beaufort Sea fields by a billion barrels over 25 years.

The consequent loss in federal revenues -- from lease sales, royalties and windfall profit taxes -- could total $15 billion over the period, according to Justice.

Both the state and federal governments wanted the lower pipeline rates because it would allow North Slope and Beaufort Sea producers to charge higher oil prices. The higher the prices, the more royalties and taxes that the governments can share.

The settlement sets the rates for moving petroleum through the pipeline at $6.05 per barrel for 1982, $5.93 for 1983, $5.63 for 1984 and $5.31 for 1985.

The six pipeline owners agreeing to the settlement are Atlantic Richfield Co., British Petroleum, Exxon Corp., Mobil Oil Corp., Union Oil Co. of California and Phillips Petroleum Co.

Pipeline owners opposing the settlement are Standard Oil of Ohio -- which with British Petroleum owns 50 percent of the pipeline -- and Amerada Hess Corp.