Thousands of California drivers had their Social Security numbers exposed in a data breach that gave federal agencies unauthorized access, the California Department of Motor Vehicles (DMV) announced Tuesday, according to a report.

The breach also showed which drivers don’t have Social Security numbers, making it especially concerning for illegal immigrants who were issued driver’s licenses by the state, The Los Angeles Times reported. The state had promised the drivers that immigration agencies would not gain access to their information.

Some of the data were accessed as part of investigations into criminal activity or compliance with tax laws, officials said.

DMVS ARE SELLING YOUR DATA AND MAKING MILLIONS, DOCUMENTS REPORTEDLY REVEAL

The seven agencies that received the information included the IRS, Small Business Administration and the district attorneys' offices in San Diego and Santa Clara counties. It was unclear if any immigration agencies gained access.

The DMV said the breach was an error and not a hack and unauthorized access to the data was cut off Aug. 2 when the mistake was discovered.

The agency notified the 3,200 drivers whose information was improperly shared "in error."

CLICK HERE TO GET THE FOX NEWS APP

“Protection of personal information is important to DMV, and we have taken additional steps to correct this error, protect this information and reaffirm our serious commitment to protect the privacy rights of all license holders,” DMV spokeswoman Anita Gore said in a statement Tuesday, according to The Times. “That’s why DMV immediately began correcting the access error following a legal compliance review, ensured that no additional confidential information was disclosed to these entities, and has implemented several additional layers of review.”

The California DMV is also facing criticism for long lines and poor management.