Missouri lawmakers gave final approval Thursday night to a measure intended to avert a potentially frustrating scenario in which untold numbers of Missouri residents could have been turned away at airports because their driver's licenses no longer are accepted as valid identification.

The legislation gives Missouri residents the option of getting a driver's license or state identification card that complies with the stricter proof-of-identity requirements contained in federal Real ID Act. It next goes to Gov. Eric Greitens.

The federal government has said that identification cards from states not in compliance with the Real ID Act will no longer be accepted at airports starting on Jan. 22, 2018.

Missouri law currently prohibits compliance with the Real ID Act, which was passed under former President George W. Bush as a response to the 2001 terrorist attacks. The FBI determined the Sept. 11 hijackers had obtained valid identification cards from various states, and a special commission recommended the federal government develop standards for issuing identification cards as a way to help prevent terrorism and fraud.

But Missouri has resisted Real ID, partly because of privacy concerns over requirements to create a database containing applicants' personal information such as their birth certificates.

As a result, Missouri is one of only a few states that haven't received extensions from the federal government to come into compliance. Missouri IDs already are no longer accepted at some military bases and federal facilities.

The new legislation would offer Missouri residents the option of getting a Real ID-compliant driver's license or identification card. The proposal would take some time to implement. But supporters hope it will show that Missouri is attempting to comply with the Real ID law and persuade federal officials to continue accepting Missouri IDs at airport checkpoints next year.