A man from Mexico used the identity of an American citizen to bilk federal and local governments of more than hundreds of thousands of dollars in benefits over three decades, according to a plea agreement entered in San Diego federal court this week, reports said Sunday.

The man identified as Andres Avelino Anduaga, 66, admitted to stealing the identity of a Texas resident named Abraham Riojos in 1980, and then used his information to apply for a California driver’s license, a Social Security number and a United States passport. The official documents identified the man Anduaga stole from as Riojos, born in Alpine, Texas, in 1958.

The fake documents allowed Anduaga to move freely between Mexico and the U.S., and also to receive nearly $361,000 in government benefits over 37 years.

Last Thursday, the Mexican pleaded guilty to theft of public property and being a previously removed unauthorized immigrant in the country. He had been deported twice earlier, once in 1994 and in 2000 under the alias Jose Reyes.

While posing as Riojos, with the identification documents, Anduaga applied for and received $361,000 in fraudulent benefits, all of which included Medi-Cal, food stamps and Supplemental Security Income (SSI) from 1981 to 2016.

His highest takeaway was from SSI, which are transfer payments designed to help the elderly, blind, and disabled people who are unable to work. Anduaga reportedly received $244,441 in SSI disability payments beginning in 1988.

He also applied for assistance from California’s Medi-Cal program, which he was actually ineligible to receive as an illegal immigrant, and got $112,981 in benefits, according to the Los Angeles Times.

Only U.S. citizens or valid visa holders can receive Social Security disability benefits, and they must be residents of the country.

Furthermore, he illegally received more than $3,486 in food stamps under a county program.

immigration U.S. Immigration and Customs Enforcement officers detain a suspect as they conduct a targeted enforcement operation in Los Angeles, Feb. 7, 2017. Immigration related federal arrests in the U.S. have soared in recent years. Photo: REUTERS

"The programs that this defendant stole from — for decades — provide benefits to America’s most needy," U.S Attorney Adam Braverman said in a statement. "This prosecution demonstrates the commitment of the United States Attorney’s Office to protecting the integrity of our welfare programs and punishing those who prey on the goodwill of our nation and its taxpayers."

Anduaga agreed to pay back to several government agencies what he stole over the years; however, he could still face additional fines as well as up to 12 years in prison when sentenced.

The investigation started in 2014, but Anduaga was finally arrested Nov. 28 last year while he was crossing the U.S.-Mexico border through the San Ysidro port of entry. Investigators eventually found he had a criminal history under 21 different names and six dates of birth, dating back to 1974, according to the L.A. Times. His convictions included forgery, firearms violation, cocaine possession and multiple DUIs, according to prosecutors.

Anduaga’s wrongdoings came to the spotlight in April 2015 while authorities were conducting a standard review to determine whether the man was still eligible for disability benefits. He gave an address in the Southern California city of Chula Vista; however, when investigators visited the home in January 2016, the landlord admitted no man named Riojos ever lived there, but instead resided in Mexico.

Investigators also discovered the real Abraham Riojos, who currently resides in Florida, had reportedly no indication his identity had been deceitfully used for over three decades.

Authorities did not make it clear as to how Anduaga feigned the identity. However, it is believed the two men did not know each other and never made contact. Sentencing for Anduaga has been scheduled for May 29.