Congressional conferees yesterday gave final approval to the first clean air legislation in 13 years after compromising on a relief program for laid-off workers in a predawn effort to avoid a presidential veto.

The compromise was tentatively accepted by White House officials at the session, setting the stage for a champagne toast by conference members at 5:05 a.m. The agreement provided the momentum to get conferees over the final hump, as House negotiators -- threatened by a Senate filibuster -- dropped their plan to protect the visibility of national parks in the West clouded by pollution from power plants.

Gathering again 10 hours later in the ornate caucus room of the Cannon House Office Building where the conference began 15 weeks ago, the 141 negotiators formally approved the package of new standards and technological demands designed to cleanse the air of urban smog, acid rain and toxic industrial emissions by early in the next century.

Sen. Max Baucus (D-Mont.), the conference chairman, called the legislation the "most sweeping environmental law this Congress will pass this century" and predicted smooth passage by both houses later this week.

Earlier, the conference stalled for hours over a House plan to award additional unemployment benefits worth $50 million a year to workers displaced by the new, far-reaching controls on industry required by the bill.

The White House threatened to veto legislation containing the five-year program when it passed the House in May, contending it would open the treasury to costly claims by workers laid off by other environmental laws. The warning picked up credibility as the more recent economic downturn and oil shortage increased wariness within the administration over the $25 billion price tag of the overall bill.

Office of Management and Budget Director Richard G. Darman, who from the start opposed clean air legislation as an expensive frill, "is just looking for an opportunity to recommend a veto, and this is his smoking gun," an administration official said last week.

With a showdown looming, White House domestic policy adviser Roger Porter and Darman aide Bob Grady camped in the Republican lounge of the House Energy and Commerce Committee hearing room Sunday night as conferees debated the issue inside. Sen. John H. Chafee (R-R.I.) played broker, shuttling back and forth with proposals by House conferees and the president's advisers.

Rep. Robert E. Wise Jr. (D-W.Va.), the bill's original sponsor -- whose state faces the loss of thousands of high-sulfur coal mining jobs because of new controls on acid rain emissions -- finally agreed at 2:30 a.m. to narrow the scope of his plan.

He had proposed a virtual doubling of the unemployment benefits available to workers able to prove that the new law was an "important contributing factor" to their job loss. Under the compromise, workers who lose their jobs "as a consequence of" tougher clean air laws would be eligible for unemployment compensation as long as they remain in a retraining program. They would have to enroll in the program at least halfway through the 26 weeks of unemployment insurance available to anyone laid off.

Although benefits would come from a special $250 million fund, they would not serve as a new entitlement program, responding to White House concerns. Instead, the program would be part of the Economically Dislocated Workers Assistance Act.

"It was a very serious threat," Chafee said of the veto warnings. "But now that disappears. The key White House negotiators were involved in the decision."

A White House spokesman said the president's advisers were "encouraged" by the compromise but will not render final judgment until they see the language of the provision.

Having reduced the danger of a veto, conferees moved to neutralize the most ominous filibuster threat. Earlier, 24 western-state senators signed a letter pledging to oppose any legislation that contained the House visibility protection plan for national parks. With several ultra-conservative senators opposed to the bill on ideological grounds waiting in the wings to help any filibuster effort, the warning was taken seriously.

The proposal, which had the support of Rep. John D. Dingell (D-Mich.), head of the House delegation, called for controls on power plants and other sources of air pollution obscuring views of such wonders as the Grand Canyon.

But when senators refused near dawn to go beyond the study of the problem provided in their bill, Dingell announced to a caucus of House members that he would give up the fight.

"It was more important to get the legislation through the conference," he explained yesterday.