The Senate yesterday approved a controversial amnesty for millions of illegal aliens, then watered it down to ease passage of sweeping immigration reforms aimed at controlling the staggering flow of Latin emigres.

On an 82-to-17 vote, the Senate rejected a move by Sen. Jesse Helms (R-N.C.) to eliminate amnesty entirely. Without the amnesty provision, sponsors said the bill had no chance of passage.

But the Senate then voted 84 to 16 to weaken the bill by increasing the length of residency an illegal would have to prove in order to win amnesty.

The amendment by Sen. Charles E. Grassley (R-Iowa), which is backed by the Reagan administration, would grant permanent resident status to anyone who came to the United States before 1977, and would provide temporary legal residency to any immigrant who arrived before 1980. The dates in the bill as reported by the Judiciary Committee were 1978 and 1982, respectively.

Grassley's rider was opposed by Sen. Edward M. Kennedy (D-Mass.), who said it would leave "in limbo" those who came to the country after 1980.

Under the measure, aliens given temporary status would be allowed to upgrade it after three years. After gaining permanent residence, aliens could apply for citizenship in five more years.

Illegals seeking the amnesty, roughly estimated to number about 1 million, would not be eligible for welfare or other federal aid programs for three years after gaining permanent residence. The federal government would provide block grants to states and localities to help pay whatever costs are associated with legalization.

In addition to the legalization of status for illegal aliens, estimated at anywhere from 3.5 million to 10 million or more, the bill could create national work eligibility cards for everyone and impose sanctions for employers who hire illegal aliens. It also would impose an overall cap of 425,000 a year on legal immigration and expand the farm worker program.

"Amnesty rewards lawbreakers" and will "make a mockery of American law," argued Sen. Paula Hawkins (R-Fla.). Helms expressed his opposition to giving amnesty "to millions of foreigners who come to this country illegally."

Sen. John P. East (R-N.C.), who said, "We have simply become a dumping ground" for illegal emigres, said if amnesty is given to aliens as a way of dealing with "unmanageable numbers" of lawbreakers, "you might forgive drug traffickers."

Sen. Alan K. Simpson (R-Wyo.), the bill's chief sponsor, replied that legalization is "the only practical solution to the problem" and would free federal agents for other work, allow employers to hire laborers legally and would eliminate a "subclass" of human beings afraid to seek medical care or to report crimes against them.

Final action on the bill is expected today. A similar bill is pending before the House Judiciary Committee.

Kennedy, who opposed the bill in committee, warned that sanctions against employers could "become a vehicle for discriminatory action against Hispanic Americans and other minority groups" because companies might not hire anyone whose immigration status they question.

Kennedy proposed reviewing the employer sanctions -- setting civil and criminal penalties for anyone knowingly hiring illegals -- after three years.

Civil liberties groups have objected to the work eligibility card provision.

The bill would require the president to devise within three years a system, probably a counterfeit-proof card, for verifying the identity and citizenship status of everyone so that employers would not unwittingly violate the terms.