Maryland Democratic lawmakers are proposing legislation that would limit federal immigration officers’ access to a state database that includes drivers licenses and other records by requiring them to get a warrant before conducting any image searches.

The database — the Maryland Image Repository System — includes license photos and other motor vehicle records and has the capability to compare images with facial recognition software, according to the Baltimore Sun.

Right now, credentialed U.S. Immigration and Customs Enforcement agents can freely access the system. The legislation would require them to secure a warrant prior to performing an image search and provide a record of all federal queries.

Maryland state Delegate Dana Stein called the current situation “unfortunate” because Maryland has established a special license for illegal immigrants to encourage them to get one.

“Now the fact that ICE can access the database that contains them — it’s just very disheartening that these licenses can be used against them,” he told FOX 5 DC.

The state of New York recently enacted legislation that allows illegal immigrants to obtain a driver’s license and blocks federal immigration agencies from obtaining motor vehicle records without a court order or warrant. The change was followed by the Trump administration restricting some state residents from expedited, cross-border travel.

Maryland Motor Vehicle Administrator Christine Nizer warned of a similar consequence if the state’s Democrat-controlled legislature passes a similar bill.

Republican Gov. Larry Hogan opposes the proposed legislation.

The bill is also opposed by the Center for Immigration Studies. Andrew Arthur, a resident fellow for the center, told The Sun that such a change would inhibit legitimate law enforcement actions by ICE in Maryland.

The U.S. Immigration and Customs Enforcement does not comment on proposed legislation.

However, the agency has told media outlets: “ICE has concerns about any state or local laws that limit the sharing and exchanging of critical information, or that protect criminals at the expense of the safety and security of law-abiding residents.”