President Carter last night signed a bill forcing the completion of the Tellico Dam in Tennessee, thus ending one of the biggest environmental controversies of the decade.

The Supreme Court had halted the dam because it would wipe out the snail darter, a tiny, endangered fish. Congress moved to exempt the dam from the Endangered Species Act, which forbids the government to harm rare forms of life.

Carter had opposed the $145 million project, which was attached to the 1980 energy and water appropriations bill. But administration advisers feared that a veto would spark congressional retaliation on the Panama Canal treaties enabling legislation and the bill to create a separate department of education -- two key issues for the president.

In a statement, Carter said he signed the public works appropriation bill "with regret." "I believe that avoiding a divisive veto battle will help focus congressional efforts on priority concerns," he said, adding that, with the exception of Tellico, the appropriations bill is "sound and responsible . . . It recognizes the need to hold down spending."

Presidential adviser Stuart Eizenstat said Carter also feared that, if he vetoed the water bill, the Endangered Species Act, up for reauthorization, "would be chopped to ribbons with amendments exempting a whole variety of projects and species.

"There was a real concern that we could win the Tellico battle and lose the Endangered Species Act war," he said.

In exchange for eigning the bill, Eizenstat said, the White House extracted promises from key congressional leaders to leave the Endangered Species Act intact and to authorize an independent review board for future water projects -- one of the last remnants of the president's proposed water policy overhaul.

Environmentalists reacted bitterly. "The president had a chance to show leadership and he blew it," said Brent Blackwelder of the Environmental Policy Center. "He backed off, although he clearly had the votes to win. He had the chance to strike a devastating blow against the pork barrel and he blew it."

Carter's action contrasted strongly to his behavior last year, when he was stronger in the polls and the election was not looming so large on the horizon. Then, he votoed the energy and water appropriations bill, which contained nine projects he opposed. The veto was sustained.

While this year's bill avoided funding any obvious Carter "hit list" projects, it was unsatisfactory to the administration in its omission of key water policy changes, such as full funding of projects to reflect long-term costs, rather than annual funding.

It also would have cut out the independent review board, designed to weed out uneconomic boondoggles.

While James McIntyre, chief of the Office of Management and Budget, reportedly urged the president to sign the bill, Interior Secretary Cecil D. Andrus had strongly advocated a veto. Andrus headed a seven-member Cabinet committee that voted unanimously against completing the dam on economic grounds.

Tellico will flood a valley containing 20,000 acres of prime farmland, displace 350 families and turn miles of free-flowing river into a lake.

Andrus had argued that the reservoir "would tie up approximately $40 million in private land values, resulting in an annual loss of $4 million in benefits from alternative land uses." A free-flowing river would provide benefits worth $600,000 more than those of a lake, he said.

Although the Tennessee Valley Authority, the dam's builder, denied that the project would provide electricity, that was the project's major attraction for its supporters, who claim it will produce 200 million kilowatt hours a year, enough for 20,000 homes.

The Tennessee delegation, led by Sen. Howard H. Baker Jr. (R-Tenn.), vigorously defended the dam, which is 90 percent complete, ridiculing the role of the snail darter.

"Should a worthless, unsightly, minute inedible minnow outweigh the possible injustice to human beings?" asked Rep. John J. Duncan (R-Tenn.).

For both sides, the issue in the last three years became an emotional one, a symbolic battle between the forces of development and conservation.

Some members of Congress feared that if Tellico could be killed for what they viewed as a frivolous reason, so could other water projects, which bring federal money and jobs to their districts.

Environmentalists view the exemption of Tellico as a precedent for a wave of attacks on the endangered Species Act, since dozens of endangered species lie in the path of possible projects.

The $10.8 billion bill contains money for numerous energy and water projects, as well as funds for the Senate's proposed Hart office building.