It started as a rather straightforward Social Security fraud investigation — a man receiving disability benefits pretending to live in the United States when in fact he lived in Tijuana.

What authorities uncovered was a 37-year identity theft scheme by an unauthorized immigrant and repeat felon who bilked federal, state and local governments out of hundreds of thousands of dollars in benefits, according to a plea agreement entered in San Diego federal court this week.