BOSTON >> Republican Gov. Charlie Baker has signed a bill bringing Massachusetts into compliance with new federal requirements for driver's licenses and other identification cards.

The requirements under the REAL-ID Act will make it easier for residents to enter federal buildings and board domestic flights once enforcement begins. The new law will also prevent those who are not in the country legally from obtaining any kind of driver's license.

Under the law, residents could apply for a REAL ID-compliant license or choose a license that's valid for driving but not for federal identification purposes.

Congress approved the REAL ID law in 2005 after the 9/11 Commission recommended more secure forms of personal identification. Immigrant advocacy groups have voiced concerns.

The Registry of Motor Vehicles will begin issuing the IDs next year.