Interior Secretary William P. Clark, ending one of the nation's longest environmental controversies, yesterday signed a compromise plan to reduce dramatically the scale of the Garrison Diversion project, one of the largest federal irrigation works under construction.

Conceived in the 1940s as a solution to drought problems in North Dakota, Garrison became one of the nation's major environmental battlegrounds. It was opposed by the Canadian government, conservationists, hunters and the National Taxpayers Union because of its high cost and anticipated environmental damage.

The plan approved by Clark was praised by North Dakota officials and the project's longtime opponents as a landmark compromise. It would convert the $1.1 billion dam and irrigation project into one providing less irrigation and more drinking water for towns and rural areas. Many municipal water supplies in the state are badly contaminated.

"This is a problem that has defied solution for 40 years," Clark told aides as he signed a letter approving the compromise. "It shows that, if we work together, we can accomplish what seemed to be the impossible."

Clark wrote to the Office of Management and Budget, asking release of $42 million for Garrison that has been under a congressional embargo since Oct. 1. Congress ordered the Interior Department then to halt construction until an independent commission could devise ways to meet North Dakota's water needs with less environmental and financial costs.

Clark also instructed his solicitor to devise legislation authorizing new features of the project proposed in the compromise. These include use of federal revenues from hydroelectric power projects along the Missouri River to finance new municipal water-supply systems.

Clark said legislation also is needed to absolve North Dakota irrigators of financial responsibility for $35.9 million of construction costs for the portions of the original project being scrapped under the compromise.

The commission, headed by former Louisiana governor David C. Treen and composed of North Dakota development interests and conservationists, worked out the plan over several months and presented it to Clark in December.

The new plan will supply water to 130 municipalities, compared with 14 under the old one. It will irrigate 130,940 acres of farm land rather than the 250,000 in the existing design. It will claim 38,115 acres of prime waterfowl habitat, compared with 70,000 in the existing design.

It scraps several environmentally destructive features of the old plan, including Lonetree Reservoir, a massive structure in the middle of North Dakota that would have flooded a national wildlife refuge.

The old project also would have transferred plant and animal life from the Missouri to the Hudson River drainage basin and into Canada, possibly violating international environmental treaties, Canada charged. The Canadian government notified the State Department that the compromise removes that threat.