ANNAPOLIS - Two bills that would allow illegal immigrants to possess Maryland driver's licenses drew galleries packed with Latinos on Wednesday, though the measure was met with hostility from some committee members.

A bill from Prince George's County Democrat Del. Jolene Ivey would repeal a 2009 Maryland law that outlawed driver's licenses for illegal immigrants, a move made to comply with the federal Real ID Act. The 2009 law let illegal immigrants keep their driver's licenses until July 1, 2015.

Ivey's bill would allow them to keep, reapply and apply for licenses in Maryland, though they wouldn't be valid for federal purposes, such as ID at an airport or federal building.

A bill from Del. Ana Sol Gutierrez, D-Montgomery County, would stop short of Ivey's full repeal and only extend the July 1, 2015 deadline to 2023 for illegal immigrants who currently hold driver's licenses.

Ivey said allowing illegal immigrants to have driver's licenses was a public safety issue. It ensures they know how to drive before getting on the road, makes it more likely they will have car insurance and would free police to pursue real crime, she said. If police stop a motorist and are unable to verify his or her identity, the officer is required to take the motorist in for booking.

Miriam Rosa testified through an interpreter that she had benefitted from being able to get a driver's license. She did not publicly say whether she was in the country legally.

"Because I had a driver's license, I was able to start my own business," Rosa said. "I would like to keep on having my business by having my driver's license. I can also move my children back and forth, and I can sustain myself."

But some legislators were skeptical about the wisdom of allowing illegal immigrants to have licenses.

Baltimore City Del. Curt Anderson, a Democrat, worried the change might put the state our of compliance with federal law.

Del. Susan McComas, R-Harford County, pointed out that there was no requirement for background checks when getting a driver's license.

"We could have sex offenders coming in from other countries or ... potential terrorists coming here and getting driver's licenses," she said.

Del. Michael McDermott, R-Wicomico and Worcester counties, questioned whether anything had changed since the legislature passed the 2009 law. He also worried immigrants would come back and claim the two-tiered licensing discriminates against them.

"I have a feeling that we're going to have people coming back and saying, 'Now I'm a second-tier citizen,' because they don't have a real driver's license," he said.