On the final, crucial weekend last month when the fate of clean air legislation was at stake after months of negotiations, Environmental Protection Agency Administrator William K. Reilly was determined to head off disaster, not from Congress but from within the Bush administration.

The White House was developing data that EPA officials feared could be used to justify weaker acid rain controls and derail the whole legislative package. So when presidential aides called to enlist Reilly's help, he was nowhere to be found. Anticipating an order to send the data to congressional conferees, he left for his weekend house in Loudoun County and remained in virtual hiding until the acid rain issue was resolved.

"If the EPA letter came, we'd still be in conference," Rep. Edward R. Madigan (R-Ill.) said several days later, suggesting that the bill would never have passed before adjournment.

Today, President Bush is expected to sign the Clean Air Act Amendments of 1990, the first revision of the law in 13 years. Although changes in congressional leadership created a favorable climate for passing the bill, Bush has received most of the credit for turning the traditional legislative free-for-all into a model of compromise. The bill he proposed 16 months ago, though generally much weaker than the final version, set the framework for debate and pried loose Republicans from the coalition of opponents.

But administration support for its own bill wavered behind the scenes, complicating passage, and in the end, almost preventing it. The divisions that opened in the Bush team reflect its split personality on environmental issues: In principle, its resolve is strong; in practice, it is often shaky, especially in the face of industry and political pressures.

Clean air became a battleground for two forces at war since the first days of the administration: advisers who view environmental protection as a key measure of Bush's commitment to a "kinder, gentler nation," and those who see it as unduly burdensome to industry. The same strains have played out in internal disputes on protection of wetlands and ancient forests, and phaseout of ozone-depleting chemicals. And the divisions are likely to be played out again in the coming debates over solutions to global warming.

In the acid rain dispute, it was White House Chief of Staff John H. Sununu lobbying for support for a budget proposal who promised Rep. Michael G. Oxley (R-Ohio) to get the new data to conferees in time to help midwestern utilities, Oxley said.

"To keep the administration position where it started was quite a challenge," one official said. "It was a constant struggle to keep everyone bought in."

The president's push for clean air dated to his 1988 campaign when he broke decisively from the Reagan administration by pledging to sponsor legislation to reduce acid rain emissions and develop clean motor fuels in the war against smog.

In office, key administration jobs were given to campaign advisers who wrote those speeches: William Rosenberg, a Michigan businessman and champion of clean fuels who was appointed assistant EPA administrator for air, and Robert E. Grady, a former aide to then-New Jersey Gov. Thomas H. Kean (R) who was named the Office of Management and Budget's associate director in charge of environmental issues.

After Reilly became the first professional environmentalist to head the EPA, the clean air team took shape and began almost immediately to sketch a bill.

Despite the campaign commitment, they found resistance in the White House. OMB Director Richard G. Darman was a vociferous critic, questioning whether cleaner air was worth the price, sources said. As first reported in the Wall Street Journal, he once recalled how the Reagan administration rejected an acid rain plan by comparing its cost to the number of fish saved. Then, he accused Reilly of proposing a solution that would double the cost per fish.

That wouldn't be so bad, Reilly joked, referring to the deadly effects of acid rain. "There's a lot less fish."

Reilly won his proposal for a 10-million ton reduction and permanent freeze on acid rain emissions, but only after a last-minute clash with Sununu. He had tentatively approved the provision, then balked after a coal country congressman complained. Reilly headed off any chance of equivocation by quickly leaking news of the plans to an environmental group, boxing in Sununu by telling him he had already "gone public."

Introduced in July 1989, the bill disappointed environmentalists except in its proposal for clean fuels and acid rain cap. But it established a whole new political dynamic in Congress, putting Republican loyalists on the side of clean air for the first time and weakening a pro-industry coalition that had worked with President Reagan in the 1980s first to gut the Clean Air Act, and when that failed, to stop efforts to bolster it.

Environmental forces had already gained strength in the Senate with the election of Majority Leader George J. Mitchell (D-Maine), who promised to pass clean air legislation blocked for years by his predecessor, Sen. Robert C. Byrd (D-W.Va.). In the House, Rep. John D. Dingell (D-Mich.), chairman of the Energy and Commerce Committee and longtime leader of the opposition, shifted strategy and agreed to serve as Democratic sponsor of the Bush package.

Still, when the bill reached one of his subcommittees, Dingell tried to weaken its clean fuels provision, setting the stage for another clash between Reilly and Sununu. Drafting a version more favorable to auto makers in his Detroit district, Dingell and Rep. Norman F. Lent (N.Y.), the chief Republican sponsor, pressed Sununu to back off of what was a cornerstone of the administration bill, according to administration sources.

As the committee debated the weakening measure Oct. 11, 1989, Lent announced that he had received a telephone call from Sununu who "assured me that President Bush does not oppose the amendment." Apparently tipped off by aides, Reilly, then giving a speech in Chicago, also placed a phone call that day, to Rep. Henry A. Waxman (D-Calif.), the subcommitte chairman. He told the panel that Reilly had emphasized the administration's opposition to the amendment.

The amendment was approved, but Reilly's intervention embarrassed the White House into reaffirming its support for alternative fuels the next day.

After the bills reached congressional conferees, the administration was relegated to the sidelines. But with the last major issue, acid rain, on the table, midwestern Republicans asked the White House for help.

According to calculations by the director of the National Acid Precipitation Assessment Program, an interagency task force that has been studying acid rain, utilities would have to cut acid rain emissions by at least 10.5 million tons per year -- 500,000 tons more than previous EPA estimates -- to meet the nationwide cap. The data suggested that dirty utilities in the Midwest would be required to make more cuts than they had expected.

On the day of a key budget vote early last month, Oxley asked Sununu to circulate the data before the acid rain plan was finalized. "He gave me an affirmative answer and pointed to {Roger} Porter," the president's domestic policy adviser, Oxley said.

Porter promised Madigan that the EPA would produce the data, Madigan said, noting that "a letter from the EPA was a more environmentally credible document."

The promise had some potentially far-reaching ramifications. Allowing extra emissions would violate the cap, the boldest stroke in Bush's bill, and shatter the delicate formula each chamber worked out to limit utility pollution. Some conferees, informed of Porter's plans, threatened to walk out.

Said Sen. Alan K. Simpson (R-Wyo.), a conferee, "I can't think of a more disruptive influence."

Administration officials were split. Meeting in Porter's office Oct. 18, his assistant, Teresa Gorman, pushed for the letter. Grady was against it. White House counsel C. Boyden Gray urged caution.

Rosenberg disputed the calculations. The latest EPA estimate, he said, projected cuts of about 10.1 million tons to meet the cap. When Porter pressed a draft letter on him to sign, Rosenberg insisted that Reilly have the final say, sources said.

On the morning of Oct. 20, as conferees focused on acid rain, Reilly argued against the letter in a talk with Porter, and the decision whether to send it was left open, according to sources.

Under pressure by Oxley and Madigan, Porter decided to have the letter sent later in the day. But he could not find Reilly or Rosenberg, who also left Washington without leaving a forwarding number or a way to be contacted, sources said.

"Roger was beside himself," Oxley said. "He felt he had a commitment to us."

Early the next morning, a Sunday, the conference worked out its differences on acid rain, clearing the way for final agreement on the package the next day.

Reilly refused to be interviewed for this story, saying only that "great credit must be given to President Bush and his team" for helping to pass the legislation. Rosenberg also declined comment. Porter could not be reached.