"She has fulfilled her requirements for a California driver's license," said the DMV's Mike Marando.
L.A. Superior Court Commissioner Scott Gordon, who's overseeing her custody case, had ordered her to show proof that she was a legal driver. Her lawyer told PEOPLE that among the reasons she lost temporary custody was because she lacked a valid license.
On Monday, Spears, 25, handed off sons Sean Preston, 2, and Jayden James, 1, to a bodyguard for ex Kevin Federline, then drove with a friend to a DMV office in Van Nuys, Calif.
"Ms. Spears actually took and passed a written test in April," Marando says. "She was fingerprinted and photographed yesterday. She will be issued a formal license in the mail soon."
According to the DMV, Spears had never been issued a California license, despite having homes in Los Angeles for years. The state requires people to apply for a license within 10 days of residence.
Another hearing in the custody case is set for Wednesday.