The Maryland General Assembly yesterday passed legislation to extend in-state tuition benefits to illegal immigrants attending state colleges and universities, but the Senate and House still must resolve a related effort to help military personnel with tuition costs if the bill is to become law.

The effort to give illegal immigrants a break was sparked by local community colleges, who said out-of-state tuition rates were effectively closing the door on many immigrants who have lived in Maryland for years.

"The truth of the matter is, federal law requires that we educate these immigrant children from kindergarten through 12th grade," said Del. Nancy J. King (D-Montgomery), a former school board member. "It only makes sense that we continue to educate them."

But the debate this year, particularly in the House, has been at times an uncomfortable window into deeper views on immigrants and immigration. Some lawmakers painted the bill as an "us vs. them" measure that would mean fewer spots in state colleges for U.S. citizens, while others tried to substitute the word "immigrant" for "illegal alien."

Del. Emmett C. Burns Jr., who initially supported the bill, said he was torn after hearing from angry constituents. "I have to think about African Americans trying to get into higher education," said Burns (D-Baltimore).

On Thursday, when the bill first came to the House floor, Del. Herbert H. McMillan (R-Anne Arundel) offered an amendment to extend in-state tuition rates to all active and honorably discharged military members and their families -- an addition that many saw as a deal killer.

But, with the war in Iraq and patriotic fervor running high, many were quick to sign onto it, despite the fact that Maryland already has a fairly liberal policy when it comes to military families. Currently, active-duty troops must show only that they are stationed in Maryland and they and their families will receive in-state rates .

Several lawmakers invoked the name of Pfc. Jessica Lynch, the badly injured POW who was dramatically rescued by U.S. Special Forces in Iraq.

"These are people who pay their taxes in blood," McMillan thundered in the debate. "If we can extend this tuition privilege to people who are here illegally and we can't to the military, something is wrong."

The Senate took a different approach, tacking a far narrower amendment for the military onto its immigrant tuition bill. With so little time left to resolve their differences -- the General Assembly is set to adjourn tomorrow -- lawmakers said they worry that the measure will die.

Kim Propeak, an advocate with Casa de Maryland, said many undocumented immigrants have been granted asylum or temporary status, but cannot become citizens.

Paying tuition rates two and three times those of in-state residents for community college and nearly $10,000 more to attend the University of Maryland effectively bars many from going to college, she said.

"It's so said when a kid dreams of becoming a doctor or a lawyer, we put these barriers in the way," she said. "Don't let their immigration status bar them from the future."

The bill, similar to laws in New York, California, Texas and Utah, requires that the prospective immigrant student has graduated from a state high school or attended school in state for three years and has signed an affidavit signaling an intention to become a U.S. citizen.

State community colleges and the University System of Maryland both supported the measure.

"It's a matter of fairness," said Francis Canavan, spokesman for the university system. "Many of these students have been here since kindergarten."

Earlier estimates, which some dispute, found that the measure could apply to about 160 immigrants. University budget analysts found the bill could cost $1.6 million a year, and the figure rises every year after that. No estimates were available on extending tuition benefits to military families.

Ken Masters, Republican Gov. Robert L. Ehrlich Jr.'s lobbyist, said the governor wants to review the measure should it receive final passage. "We want to see what shape it is in," Masters said.