The Union Pacific Corp. yesterday completed its acquisition of the Western Pacific and Missouri Pacific railroads only hours after Chief Justice Warren Burger declined to block the merger.

The events make Union Pacific the third largest railroad in the nation by track mileage and the second largest by revenue. In 1981, the three railroads had combined revenues of $4.2 billion and a total profit of $345 million. The new railroad will be a 22,800-mile system serving 21 states and carrying grain, coal and other commodities from Chicago to the Pacific Coast and south to the Gulf of Mexico.

Competing railroads, led by Southern Pacific, had been seeking to stay the merger, which was approved by the Interstate Commerce Commission in September. "There is a pending legal challenge" unchanged by Burger's ruling, ICC general counsel John Broadley said, but Union Pacific spokesman Tom LaHood said, "we're optimistic" that the courts will uphold the merger.

A number of peripheral issues remain unresolved in the courts, including questions of track rights and the amount of compensation involved.

Burger's ruling, made without comment, left no bar to the mighty Union Pacific to go ahead with the merger, which the ICC had said could take place as early as Nov. 19. Union Pacific President John Kenefick announced in Omaha not long after Burger's ruling that the other two railroads have been acquired through a series of stock transfers.

"Priority will be given to consolidating the sales forces," Kenefick said in a statement. "This will enable the combined railroads to provide better service to shippers and thus begin taking advantage of commercial opportunities as a single system."

Union Pacific Chairman James H. Evans said he was "enormously pleased with Justice Burger's decision not to delay the merger."

Union Pacific spokesman LaHood said there is no timetable for reorganizing management of the three railroads and predicted it would be "a very methodical and well-thought-out process." He said the companies had been reluctant to start reorganizing pending the possibility of a Supreme Court stay.

The ICC approved the merger of the three Western railroads, 5 to 1, saying the new railroad will "enhance efficiency and competition while providing improved service to shippers."

Under the agreement already approved by the boards of directors of the three companies, Western Pacific will become a divison of the Union Pacific, which along with Missouri Pacific will be managed by a new holding company, Pacific Rail Systems Inc.

The merger is the latest in a series of railroad realignments that have led to a much stronger industry than the one crippled with financial problems a decade ago.

It came at least partially in response to an earlier action by Southern Pacific. Kenefick told The Associated Press in a December interview that when the Southern Pacific purchased the old Rock Island Line from New Mexico to St. Louis, "We saw that as a threat" to Union Pacific traffic across the central United States and began merger negotiations.

The ICC, now very much a deregulatory body, approved the merger two years after the initial filing by the three railroads and was praised by industry leaders for its quick handling of the issue.