SAN DIEGO -- A Mexican man who was deported twice and had a history of arrests was able to assume the identity of an American citizen and receive more than $360,000 in government benefits for nearly four decades, California court records show. Andres Avelino Anduaga used a fake birth certificate starting in 1980 to develop a seemingly legitimate persona by applying for a California driver's license, Social Security number and U.S. passport, according to documents obtained by the San Diego Union-Tribune. The official U.S. documents identified him as Abraham Riojos, born in Texas in 1958.

Anduaga, who's actually 66 years old and a resident of Tijuana, Mexico, pleaded guilty last week in San Diego to theft of public property and being a previously removed unauthorized immigrant in the U.S., the newspaper reported Saturday.

He has agreed to pay back government agencies what he stole but could face additional fines and 12 years in prison when sentenced in May.

Get Breaking News Delivered to Your Inbox

Anduaga's charade began to unravel in April 2015 during a standard review to determine whether he was still eligible for disability benefits. The man who called himself Riojos gave an address in the Southern California city of Chula Vista, according to the criminal complaint. But when investigators visited the home in January 2016, the landlord admitted Riojos never lived there but instead resided in Mexico, court papers show.

Investigators turned to border crossing records, finding frequent travels indicating Riojos had likely been living in Mexico.

Further investigation revealed the man claiming to be Riojos had a rap sheet that included 21 different names and six dates of birth, dating back to 1974, the newspaper reported. They included a firearms violation, forgery, cocaine possession and multiple DUIs, according to prosecutors.

Immigration records showed he'd been deported in 1994 and again in 2000.

An analysis of Anduaga's benefits showed he first applied for Supplemental Security Income benefits in 1989 and was awarded payments retroactive to 1988. He received monthly payments -- $244,441 total -- until Aug. 1, 2016, according to his plea agreement.

He also qualified for Medi-Cal benefits and payments and received $112,981 total. In addition, he illegally received more than $3,486 in food stamps under a county program, according to records.

Investigators tracked down the real Abraham Riojos to a small town in rural Florida. He told the special agents who visited him that he had no idea his identity had been used all these years.