SACRAMENTO, Calif. (Reuters) - An avowed Republican activist and supporter of U.S. President Donald Trump, who was born in Mexico but lived in the United States illegally for more than 20 years, was found guilty on Friday of identity theft and five counts of alien voter fraud.

A federal court jury in Sacramento, California, returned the guilty verdict against Gustavo Araujo Lerma, 64, after several hours of deliberation, capping a five-day trial in which defense lawyers presented letters of thanks from Trump and top Republican Party officials.

The case posed an ironic twist to Trump’s oft-repeated but unsubstantiated claim that millions of non-citizens fraudulently cast ballots against him in 2016, skewing the popular vote in favor of his Democratic opponent, Hillary Clinton, while he won in the Electoral College.

Lerma, who also was found guilty of passport fraud, faces up to 22 years in prison when he is sentenced on Nov. 26, according to a statement from the U.S. attorney for the Eastern District of California announcing the verdict.

According to evidence presented at trial, Lerma was born in Mexico in 1955 but in the early 1990s he fraudulently assumed the identity, including Social Security number, of a Puerto Rico-born U.S. citizen, Hiram Velez, who died in 1997.

Lerma later used his stolen identity to illegally obtain U.S. citizenship for his Mexican-born wife and two children, and to obtain U.S. passports. He fraudulently voted under his false ID in five federal elections in California, including the 2016 non-partisan primary and general elections for president.

Federal prosecutors made no assertions about who Lerma voted for in those races, but the defense acknowledged he was a registered Republican.

Defense attorneys contended their client was entitled to use the name Hiram Velez under California common law permitting a person to change his name at any time without initiating legal proceedings, and said that even his children knew him only by his assumed name.

Making the case for their client’s legitimate use of the Velez ID, his lawyers filed a list of exhibits including drivers licenses and pay stubs, as well as Republican National Committee and Trump presidential campaign membership cards in his assumed name.

During the trial, the defense presented a letter of thanks addressed to Velez from Trump dated June 2017. The letter, according to the Sacramento Bee, stated in part that the president and Vice President Mike Pence “are deeply grateful for your resolve to help us make America safer, stronger and more prosperous than ever before.”