A controversial bill that would grant new protections against discrimination for the physically and mentally disabled passed the Virginia Senate today, but only after it was amended to exclude a major group, the chronically mentally ill.

The amendments were a particularly bitter defeat for the bill's proponents, who said later that except for a mix-up in one vote, the measure in all likelihood would have passed intact. The bill, which drew strong support from Gov. Charles S. Robb and vehement opposition from business groups, now goes to the House of Delegates.

As amended today, the measure would forbid discrimination against the state's 750,000 mentally and physically disabled in such areas as employment, housing and voting. The current state law covers only the physically disabled.

The bill would provide victims of discrimination with legal protection under the auspices of a new state agency empowered to mediate complaints and, if necessary, file suit on behalf of victims. It would reorganize the state bureaucracy in ways that supporters say would make for more effective services for the disabled.

But the antidiscrimination provisions would not cover those who have shown a prolonged pattern of psychotic, behavioral or emotional disturbances. State Sen. Dudley (Buzz) Emick (D-Botetourt), who argued for an amendment to exclude that group during a two-hour floor debate, said that while he supports the rights of the handicapped, "It is wrong for the government to say to an employer that you must, upon the threat of legal action, take a chance on . . . a person who has had a chronic history of that kind of thing."

Other legislators expressed concerns about the potential liability an employer might face if a mentally disabled employe caused an injury.

The bill's sponsor, Del. Warren Stambaugh (D-Arlington), who had described the provisions on the mentally ill as "the heart of the bill," left the chamber after Emick's amendment was adopted. State Sen. Douglas Wilder (D-Richmond) said the bill was "gutted," but Sen. Jospeh V. Gartlan (D-Fairfax) and others said the measure still represents important support for the disabled. George M. Stoddart, Robb's press secretary, said, "We're pleased we were able to reach agreement in so many areas."

The voting mix-up came on a vote to adopt two amendments by the bill's supporters. Sen. Richard Saslaw (D-Fairfax) mistakenly cast a no vote, and the amendments failed on a vote of 20 to 18. If Saslaw had voted as he intended to, three of the bill's proponents said, Lt. Gov. Richard J. Davis of Portsmouth would have had to break a tie and the amendments would have passed, deflating momentum for Emick's amendment.

Saslaw, who said his voting machine malfunctioned, immediately called for a new vote, but by then Sen. Virgil H. Goode Jr. (D-Rocky Mount), who abstained the first time, had sized up the situation and joined the bill's opponents to defeat the amendments.

Sen. Clarence Holland (D-Virginia Beach), who fought doggedly along with others in committee to include the mentally ill, said afterwards: "You take your licks and you go on. I will make sure next time that Saslaw knows which is the yes button. It shows sometimes you need to pay attention." Gartlan said that Saslaw, who could not be reached for comment, "feels bad."

For Stambaugh, the bill has been an experience in the special blend of discomfort and pleasure in legislative enterprise. After the bill cleared a Senate committee eight days ago, an exultant supporter ran up, threw her arms around him and shouted, "I love you!" Another supporter wrote telling him he had won her enduring friendship.

"Every time I get frustrated, I'll just look at that letter and think there's somebody out there," Stambaugh said.

Stambaugh indicated that the inspiring moments were juxtaposed with the realization that, to placate angry business groups, he had given up some protections that those who hugged and wrote him wanted, and that he thought deserved.

He said he thought he had to agree to a stipulation that employers with fewer than 50 workers were presumed to be incapable of spending more than $500 to alter the work environment to accommodate the handicapped. But his thinking matched that of one of the bill's supporters, who told him sadly, "We don't have an employer in my county that employs more than 50 people."

Stambaugh also gave away a provision that would have allowed the disabled to sue for punitive damages in cases of discrimination, such as eviction from a restaurant.

In an interview last week, Stambaugh, who could not be reached for comment today, said the bill still represented "a significant advance" for people for whom life demands "courage and bravery" on a daily basis.