The Bush administration and New York agreed Saturday on a compromise creating a more secure driver's license for U.S. citizens and allowing illegal immigrants to get a version.

New York is the fourth state to reach such an agreement, after Arizona, Vermont and Washington. The issue is pressing for border states, where new and tighter rules are soon to go into effect for crossings.

The deal comes about one month after New York Gov. Eliot Spitzer announced a plan whereby illegal immigrants with a valid foreign passport could obtain a license.

The agreement with the Homeland Security Department will create a three-tier license system in New York, the largest state to sign on so far to the government's post-Sept. 11 effort to make identification cards more secure.

Spitzer, who has faced much criticism on the issue, said the deal means New York "will usher in the most secure licensing system in the nation."

Homeland Security Secretary Michael Chertoff said he was not happy that New York intended to issue IDs to illegal immigrants. But he said there was nothing he could do to stop it.

"I don't endorse giving licenses to people who are not here legally, but federal law does allow states to make that choice," Chertoff said.

New York will produce one ID that will be as secure as a passport and is intended for people who soon will need to meet such requirements, even for a short drive to Canada.

A second version of the license will meet new federal standards of the Real ID Act, a law designed to make it much harder for illegal immigrants or would-be terrorists to obtain licenses.

A third type of license will be available to undocumented immigrants. Spitzer has said this ID will make the state more secure by bringing those people "out of the shadows" and into American society, and by lowering auto insurance rates.

New York has between 500,000 and 1 million undocumented immigrants, many of whom are driving without a license and car insurance or with fake driver's licenses, Spitzer in September when he announced his executive order.

The administration has not finalized standards for Real ID-compliant driver's licenses, but Spitzer said he believed the new licenses would meet those standards or come very close.

Many states have complained it is far too expensive to comply with the new law. Neither the governor nor Chertoff would say how much it would cost to put the system in place or who would pay for it.