Supporters of question 4 talk to voters at Glenarden Woods Elementary School in Glenarden, Md. as they enter the polling site on Election Day. (Sarah L. Voisin/The Washington Post)

A Maryland law that grants an in-state tuition discount to undocumented college students won voter approval Tuesday in a referendum that set a precedent in the national debate over illegal immigration.

By Wednesday morning, Question 4 had built an insurmountable lead in unofficial returns, with 93 percent of precincts reporting. (Full Maryland election results)

“This is going to be a tremendous victory,” Gov. Martin O’Malley (D) said in Baltimore as results were coming in, capping support for the measure that included spirited rallies and marches.

Del. Neil C. Parrott (R-Washington), a leading opponent of the law, acknowledged that his side was trailing significantly. No matter what the outcome, he said, it was a victory for voters to be able to consider the question.

Preelection polling showed broad support for the law, known as Maryland’s version of the “Dream Act,” which grants in-state public tuition rates to certain undocumented immigrants who attended Maryland high schools for at least three years and meet other conditions.

The law won approval last year from the Democrat-controlled General Assembly and O’Malley. But the issue landed on the ballot after critics collected enough petition signatures to force a referendum on whether to uphold the statute or strike it down.

About a dozen other states have laws or policies that echo Maryland’s version. But the outcome of Question 4 set a precedent. No other state has approved such a law through a popular vote.

Francisco Javier Mercado, 42, a Silver Spring resident and native of El Salvador, said the prominence of immigration issues led him to vote Tuesday for the first time. “I am 100 percent in favor of the Dream Act,” Mercado said. “It is another opportunity for the students that want to better themselves. We can’t deny them an education.”

In Upper Marlboro, Sandra Bossard, 62, said she voted against the referendum. “I know young people who are citizens who have difficulty getting into college,” Bossard said. “We need to support our own and take care of our own.”

Under the law, students who qualify for the tuition benefit must first attend community college. Those who receive an associate degree or at least 60 credits at the two-year school can then qualify for a tuition discount at a four-year university.

For students from families of modest means, the subsidy is crucial to hopes of getting a bachelor’s degree. At the University of Maryland in College Park, in-state tuition is $7,175 a year. For out-of-state students, it is $25,554.

Critics called the law an unjustified giveaway of taxpayer funding. They also said it would leave fewer slots available at U-Md. and other selective public schools for U.S. citizens. Proponents called that argument unfounded.

U-Md. President Wallace D. Loh, a supporter of the law, said the number of undocumented students who would qualify for the benefit at College Park would be minimal, perhaps 20 a year.

“Yes, they are undocumented,” Loh said. “But we’re talking about people who came here as children.” He called the issue a matter of “fairness and justice” and said that Maryland has a vested interest in providing higher education access, at a low price, to all its high school graduates.

Maryland’s law stands out among similar statutes across the country. Experts say no other state that provides an in-state discount for undocumented immigrants requires the students to attend community college first. Some analysts estimated that the tuition subsidy could cost taxpayers $3.5 million a year. But there is little consensus on the cost because it is unknown how many students would qualify for the benefit.

Debate over tuition benefits for illegal immigrants arose in the Republican presidential primary. Texas Gov. Rick Perry, a supporter of such benefits, drew criticism for his stance from former Massachusetts governor Mitt Romney, the eventual Republican nominee. The campaign on Question 4 in Maryland was largely overshadowed by debate on ballot measures related to same-sex marriage and gambling.