After almost a decade of debate, the Virginia General Assembly enacted a bill yesterday that will bring pari-mutuel betting and horse racing tracks to the state if the voters agree.

Approval came on a 24-to-14 Senate vote that sent the measure to Gov. John N. Dalton, who has indicated he will sign it. If he does, voters will be asked in a referendum next fall to decide whether to allow race tracks in the state.

The controversial pari-mutuel betting bill passed the Senate three times in previous years but passed the House of Delegates for the first time this year, on a 53-to-48 vote.

Although the Senate opponents wer fewer in number, they wer no less passionate than the House opponents as they reiterated the arguments against allowing horse racing in the state.

"Virginia is synonymous with honor, integrity and responsibility," said chief opponent Sen. Frederick T. Gray (D-Chesterfield). "Do we want to change that? The question should not be 'Shall the bill pass?' but 'Can the government of Virginia stand against the tide of temptation pari-mutuel betting will bring?'"

The bill, which supporters say includes the toughest restrictions on horse racing anywhere in the 30 states that have such operations, requires, in addition to the statewide referendum, that a referendum be held in any locality before a racetrack could be built there.

A study commission has recommended that the two tracks the bill would permit be built in Northern Virginia and Tidewatet. Maryland officials have said that a racetrack in Northern Virginia could hurt their business.

In fact, Maryland has been mentioned often in the debate on this bill. Opponents cite it as an example of a state where horse racing led to convictions of top government officials, including suspended Gov. Marshall Mandel.

In response to claims that racetracks would attract organized crime and political corruption, drafters of the bill included provisions that restrict ownership of stock in racetracks and prohibit any member of the racing commission that would be appointed by the governor from contributing to any political candidate.

Seventy-five percent of the stock in any racetrack would have to be owned by Virginians and no more than 5 percent could be owned by any one family unit.No member of the General Assembly could own stock in a racetrack, and all records relating to the activities of the commission in regulating racetracks are to be open to the public.

The powers of the racing commission, which would regulate the privately owned tracks, have been the source of some of the opposition to the bill. The commission would have subpoena powers and would be required to fingerpring everyone who works in any connection, be it selling popcorn or owning a horse, with a racetrack.

Eleven amendments proposed by Sen. Gray and aimed at adding further restrictions were rejected by the Senate. In one amendment, Gray suggested that the question on next November's referendum ballot include a notification that the General Assembly may come back next year or in years after and change the bill it approved yesterday. Gray called it the "bait and switch amendment."

"I think the people of Virginia know that while we're in session, life liberty and property are in jeopardy," said the Senate floor manager for the bill, Peter Babalas (D-Norfolk) in opposing Gray's suggestions.

Sen. Stanley Walker (D-Norfolk), an opponent of the measure, said the addition of ractracks would place an additional burden on an already understaffed law enforcement system. "This is a threat to our state," he said, "Virginia is Virginia. We are not Las Vegas, Nevada. Maybe after this we'll go like New Jersey has and have a referendum to put gambling casinos in Virginia Beach. It's not our style."

Of the eight Virginia senators, six voted for the bill and two against it. Those for it, were: Democrats, Adelard L. Brault, Charles S. Colgan, Clive DuVal, Joseph V. Gartland, Omer Hirst, and Charles Waddell.

The two senators who opposed the measure were Democrat Edward Holland and Republican Wiley F. Mitchell.