LOS ANGELES (AP) _ Federal officials postponed inspection of a Southern Pacific Co. railyard just weeks before a train from the yard derailed, causing a toxic tragedy in the Sacramento River, a government inspector said Thursday.

Regional safety inspector Tom Paton told a legislative hearing in Los Angeles that he postponed the Colton yard inspection because almost all the company's locomotives had failed safety inspections and he felt the company was under too much financial pressure.

Chicago-based Southern Pacific cars have been involved in two derailments this summer that spilled toxic substances in California.

The derailment spill in the northern California town of Dunsmuir on July 14 killed all life in about 45 miles of the Sacramento River, from the derailment site to Shasta Lake. The train departed the uninspected Colton yard, and a derailed tank car spilled about 15,000 gallons of herbicide into the waterway.

Two weeks later, 14 cars of a Los Angeles-to-Oakland freight train jumped the tracks near Seacliff, spilling 440 gallons of poisonous hydrazine at a freeway overpass and closing coastal Highway 101 for five days.

''I'm getting a real strange feeling that there are economic considerations that are driving safety decisions,'' said Assemblyman Richard Katz, a Los Angeles Democrat who led Thursday's legislative hearing.

Paton told Katz that four safety inspections turned up an 80 percent failure rate on Southern Pacific equipment. The inspections were conducted in June in Southern Pacific yards in Bakersfield and Rosefield; Sparks, Nev.; and Tucson, Ariz.

''What it sounds like you're telling me is that, in the wake of four inspections that scare the hell out of me, you decided to pull out of the Colton yard because it placed a great burden on the company,'' Katz said to Paton.

''That's basically what I'm saying,'' said Paton, who is an inspector with the Federal Railroad Administration.

Paton said he believed he had pushed the railroad as far as he could to get it to comply with safety rules.

The inspections were disparaged as ''white-glove tests'' by the railroad's vice chairman, who said items such as dirty windshields were counted as safety violations.

''We do have a serious dispute with them whether, in fact, the defects which they cite are of such a nature as to be a concern to public safety,'' said vice chairman R. F. Starzel.

''There is a great concern for safety by the railroads,'' he told the hearing. ''They have programs which work and as a result you will find that safety on the railroads nationally and in California has measurably increased.''

Paton told the hearing that the federal agency only looks at locomotives that have already been inspected and declared safe by the railroad. But the railroads can still operate locomotives that are not inspected by federal officials, he said.

Katz said the lack of surprise inspections made the high failure rate even more horrifying.

''This is a surprise inspection where they get to fix everything before they show it to you and it's still got an 80 percent failure rate,'' Katz said.