The co-founder of Students for Trump pleaded guilty Tuesday to scamming consumers and businesses out of $46,000 by posing as a lawyer online and dispensing legal advice, federal prosecutors said.

John Lambert, 23, went by "Eric Pope" and pretended to be a New York-based attorney at a law firm called "Pope and Dunn," the Justice Department said. He pleaded guilty in a New York federal court to one count of conspiracy to commit wire fraud.

Authorities said he created a fake website and claimed to have 15 years' experience in corporate and patent law. They also allege Lambert pretended to be a graduate of New York University's law school.

“Are you an attorney?” Judge Valerie Caproni asked the Tennessee native in court, the New York Post reported.

“No, your honor,” Lambert replied.

Lambert founded Students for Trump during the 2016 presidential election.

He ran the scheme from August 2016 to April 2018 and made several appearances on news shows, prosecutors said.

"Lambert’s de facto career was one of a grifter; he had never been to law school and certainly wasn’t an attorney. Today, Lambert admitted to his crimes and faces time in prison for his misdeeds," Geoffrey S. Berman, the U.S. attorney for the Southern District of New York, said in a statement.

CLICK HERE FOR THE FOX NEWS APP

Under the terms of the plea deal, Lambert will forfeit $46,654 and won't appeal any sentence of 21 months or less, according to the paper.

He faces up to 20 years in prison. He is scheduled to be sentenced Nov. 18.