The Virginia Department of Motor Vehicles will begin issuing a new driver's license next year to bring the state in compliance with a sweeping federal law that tightens security requirements for state-issued identification.

Virginia is one of several states scrambling to comply with the controversial 2005 domestic security program known as the Real ID Act, which was designed to help prevent terrorist attacks and reduce the number of licenses granted to undocumented immigrants.

The Department of Homeland Security has given Virginia until June 6 to comply with the act. But Virginia officials say the state has been granted an extension through October and anticipate the federal government will give them extra time to fully implement the needed changes.

"We don't expect this to have any impact on Virginians because we are working toward compliance and in October of 2018, they will be able to get the Real ID compliance ID," DMV spokeswoman Brandy Brubaker said.

Under the federal law, states are required to issue more secure licenses by requiring applicants to provide proof of identity and legal U.S. residency. States also must use counterfeit-resistant security features on the IDs.

Maryland and the District of Columbia are already in compliance.

Beginning in the fall of 2020, the only driver's licenses that will be accepted for purposes such as boarding commercial flights will be those that meet federal Real ID requirements. But beginning Jan. 22, 2018, Transportation Security Administration agents will begin enforcing the air travel provision at security checkpoints, accepting licenses only from compliant states or those that have been granted extensions. Passengers without such licenses will have to present an alternative form of acceptable identification.

The Department of Homeland Security says that states have made "considerable progress" in meeting the requirements and that every state has a more secure driver's license than before the law was passed. Still, only 25 states and the District are in compliance. Most of the remaining states and U.S. territories, including Virginia, have received extensions, according to the DHS. Maine, Minnesota, Missouri and Montana are the only states listed as being noncompliant and lacking an extension from the agency.

"For states that are not in compliance and were not granted an extension, enforcement is ongoing," DHS spokeswoman Justine Whelan said.

Residents of those four states can't use their state-issued IDs to enter federal buildings or military bases. Come January, if their state's status is unchanged, they will need to provide another form of identification for domestic travel - a passport, U.S. military ID, permanent resident card or one of the trusted traveler cards, such as Global Entry.

Congress passed the Real ID Act after the Sept. 11, 2001, terrorist attacks. Among recommendations made by the 9/11 Commission was to toughen federal standards for driver's licenses and birth certificates; 18 of the 19 Sept. 11 hijackers obtained state IDs, some of them fraudulently. Nearly half of the hijackers obtained their driver's licenses in Virginia.

Implementation of the law was to take effect in 2008, but deadlines have been extended to give states more time to comply. About half of the states objected to the program, and at least 13 legislatures passed laws prohibiting their states from complying.

Privacy advocates and civil liberties groups argued that the program would create a de facto national ID, and some state officials said complying would be too costly: One report by a coalition of state groups said it would cost $11 billion to implement the technology required by the Real ID Act, and would require potentially double fees and wait times for the more than 210 million Americans whose licenses would have to be reissued.

States have struggled with the additional requirements for people trying to get licenses, such as obtaining birth certificates, Social Security cards and multiple proofs of residency. But pleas to the DHS and Congress for modifications to the law and its implementation were unsuccessful.

Enforcement at federal buildings began in 2014, and the last phase, affecting air travel, is looming. Several states are taking extra steps to comply. Maine, Minnesota, Montana and Alaska passed compliance bills this year.

"The biggest problem of Real ID are the inconveniences it poses," said Jay Stanley, a senior policy analyst at the American Civil Liberties Union. "Some burdensome requirements have made visits to DMVs around the country much more difficult."

Virginia was the first state to try to increase the security of its driver's licenses after the Sept. 11 attacks, and many of the state's lawmakers supported the Real ID safeguards. But officials have struggled over how to implement and pay for the federal requirements that affect the state's 6 million licensed drivers.

They also had concerns about protecting residents' privacy, officials said. The state driver's license was redesigned in 2009 to add about two dozen security features, but those enhancements didn't meet all the federal requirements.

"We had put forth a plan before the Department of Homeland Security with some alternatives toward compliance that we thought met the intent and spirit of the law, using the power of modern technology to electronically verify documents," Brubaker of the DMV said. "But we learned that DHS would not accept those alternatives to compliance, so we are now moving forward in the way that they want us to."

The new Real ID cards will be rolled out in October 2018, at a cost of about $20.7 million. The new license will be marked with a star in the upper-right corner, which indicates that it's in compliance with the Real ID Act.

Virginia officials said they will not require everyone who has a license to get the new card, but they anticipate as many as 2.7 million license holders will request it. Virginians who want to use a driver's license to board a commercial aircraft will need to get the new card by October 2020.

The Real ID card will have a one-time $10 fee that will help pay for implementation. To get one, current license holders will be required to present two proofs of residency instead of one, and will have to present their Social Security card instead of just providing the number. The process will require an in-person visit to a DMV office, which could lead to longer-than-usual waits, because many people are used to renewing their licenses by mail or online.

The TSA began installing signs at U.S. airports in December to alert travelers to the upcoming changes. Still, many fliers who walk past the notices at the security lines continue to be unaware of what's coming.

"I am an American citizen. It doesn't apply to me," a Virginia woman said last week as she waited to go through security at Reagan National Airport.

Said Wilson Delgado, "If this will help improve our safety, it's a good idea." Delgado has a Maryland license, so he is already in compliance.

Elena Waskey, a spokeswoman for the National Governors Association, said states and the federal government will remain engaged in discussions about the requirements and the impact on travelers. The states that aren't compliant, she said, are in the process of evaluating costs and charting their priorities and next steps.

"These states will engage in dialogue with DHS, with the expectation that their efforts are appropriately recognized," Waskey said.

And for those from states that aren't in compliance and haven't received extensions?

"It is inconceivable that DHS would bar the entire population of a major state from flying," the ACLU's Stanley said. "But I am not going to say it could never happen, especially now that all kinds of crazy things are happening."