The Interstate Commerce Commission yesterday dealt a final blow to the attempted merger of the Santa Fe and Southern Pacific railroads, refusing to reconsider its earlier rejection of the proposed marriage of the two major western railroads.

By a 4-to-1 vote, with only ICC Chairman Heather Gradison dissenting, the agency dashed the hopes of Santa Fe Southern Pacific Corp. to combine the two railroads into the nation's second-longest rail system. Instead, the company must now draw up plans to get rid of one railroad or the other within two years.

In trading on the New York Stock Exchange yesterday, the stock rose $3.75 to close at $50.

The railroads had sought the merger for almost four years, tying up corporate resources in what proved to be a futile effort to persuade the ICC that its public benefits outweighed any competitive problems. Santa Fe Southern Corp. acquired Southern Pacific in 1983, but the railroads have continued to operate separately pending a final decision on the merger.

Last July the commission rejected a staff recommendation to approve the merger with conditions designed to reduce the anticompetitive effects of combining two major Western railroads. The railroads then negotiated agreements with competing railroads designed to overcome the ICC's objections and asked the agency to reconsider the merger, saying that the changed circumstances warranted another look.

The ICC staff recommended taking a second look at the merger proposal yesterday, but the majority of the commission was unpersuaded.

"In my view the change of circumstances is little more than a change of position," said Commissioner Paul Lamboley.

"The circumstances that have actually changed have been within the applicant's control from the beginning," said Commissioner Malcolm M.B. Sterrett. Sterrett and others noted that the railroads had taken the position in the original hearings on the merger that agreements of the type that were subsequently negotiated would have destroyed the deal -- an argument that evaporated during the company's subsequent attempt to win approval.

Santa Fe Southern Pacific Corp. Chairman John S. Reed, who took over after the abrupt resignation last April of merger architect John J. Schmidt, said yesterday that the company was disappointed in the ICC decision. He said that he would recommend to the board that there be no appeal.

"The employes of both railroads have been held in suspense and uncertainty too long. It's been almost four years now, and we just have to get on with our business," he said.

The company must come up with a divestiture plan within 90 days. Reed said that no decision had been made yet about which railroad would be sold. The company will refocus on its core businesses, including transportation, product pipelines, real estate and natural resources, Reed said, but he conceded that one option for the company might be eventually to dispose of both railroads. In the meantime, the company will sell subsidiaries that are unrelated to the core businesses he listed.

Kansas City Southern Industries Inc. said yesterday that it will make a formal offer within 60 days for Southern Pacific Transportation Co. Burlington Northern Railroad Co. said yesterday that it might be interested in acquiring portions of the company's railroad units, including track and rights of way in South Texas and Mexico and in California.

Another possible bidder is Norfolk Southern Corp. Norfolk Southern has indicated in the past that it might be interested in establishing a transcontinental railroad. It sought unsuccessfully last year to acquire Conrail, the freight rail system that the federal government subsequently sold in a public stock offering, and has substantial cash on hand -- approximately $900 million. "Right now we really don't have anything to say about it," said a Norfolk Southern spokeswoman yesterday.

The commission's rejection of the merger represented a substantial shift. Earlier mergers, including those that produced CSX Corp., Norfolk Southern and Union Pacific, won approval with relatively little difficulty.

In the case of the Santa Fe and the Southern Pacific, however, the two railroads had systems that were in some respects parallel to each other, connecting southern California and the Southwest and the Southwest and the Midwest, rather than systems that connected end-to-end.

ICC Chairman Gradison said yesterday that the agency was reaching beyond its authority in disapproving the merger. "I think the reopening was denied, not because this is a bad merger proposal, but because of a feeling there is a better merger out there," she said. "It's not our task to find the perfect merger."

The message from the commission, Gradison said, "means buyer beware."