A clinical drug trial coordinator — who used his own stool samples for a drug study and pocketed the money earmarked for stool donors — received a three-year prison sentence in federal court Tuesday.

Assistant U.S. Attorney Maureen Merin recalled in court how Wesley McQuerry, 50, created fake patients, used his own stool samples, faked lab work, forged doctors’ signatures and deposited more than 2,000 checks intended for participating patients into his own bank account.

She noted that had the flawed drug study — which took place at a North Side clinic — not been uncovered, it could have tainted data the Food & Drug Administration uses in its drug-approval process.

The drug McQuerry was testing was intended to help treat HIV-associated diarrhea. McQuerry, himself, suffers from HIV.

McQuerry, who was involved with the study in 2008, apologized before Judge Charles P. Kocoras, telling him in a soft voice, “I just didn’t know what to do, I was under stress . . . I accept responsibility.”

McQuerry, who lied on his resume to help secure the job, was left largely unsupervised and was under pressure to complete the study — circumstances that Kocoras said, though unacceptable — did not constitute an excuse for his behavior.

The FDA has since taken disciplinary action against the doctor in charge, who was concurrently running about a dozen other studies.

“The doctor basically shirked his responsibility wholesale,” Kocoras said.

McQuerry had previously been convicted and served two years in prison for embezzling more than $364,000 from DePaul University when he worked in the school’s alumni relations department from 1999 to 2001.

McQuerry has a history of fraud that includes convictions for ghost pay-rolling and credit card fraud schemes.

“This defendant has shown that he will repeatedly commit fraud,” Merin said.

McQuerry’s attorney, Paul Flynn, said his client was taking college classes studying oceanography and trying to turn his life around.

“He made a terrible mistake and he didn’t know how to stop,” Flynn said.

In addition to the prison sentence, Kocoras ordered McQuerry to pay $200,000 restitution.

“You took advantage of the fact that no one was looking over your shoulder,” Kocoras said.