Three defendants who cooked up a tax fraud scheme while imprisoned are heading back to a federal penitentiary after they were sentenced  Wednesday to terms of two to five years apiece, authorities said.

Kazeem Ajala, 46, and Britten Wilder, 52, both of Atlanta, and Michael Sapp, 50, of Hopewell, Va., were sentenced on charges of mail fraud, filing false claims with the government and aggravated identity theft.

U.S. Attorney Sally Quillian Yates said in a news release that the defendants, while incarcerated, were “educating and supporting each other in trying to learn and perfect a tax fraud scheme using their combined knowledge.

“Prison is not meant to be a school of higher education to commit higher crime,” Yates said.

Prosecutors described how the scheme came about:

Ajala had been convicted in 2004 for producing and trafficking in counterfeit devices used to defraud financial institutions. Sapp, a former IRS employee, was convicted in 2005 for unauthorized disclosure of income tax information.

Also in 2005, Wilder had been found guilty on charges of bank fraud, and a fourth defendant, Joseph Flowers, was convicted of mail fraud related to an auto insurance scam.

In or around 2009, after their release from prison, Ajala, Sapp and Wilder came up with a plan to prepare fraudulent tax returns using the names and other personal information of current prison inmates.

They created fraudulent W-2 forms, used fake business names, and asked the IRS to send refunds by mail to an address they controlled. Ajala then recruited Flowers to cash the refund checks.

In one month, prosecutors said, the scheme netted $73,551.

Wilder was sentenced to five years and four months in prison, and Sapp, to four years and six months. Ajala, who cooperated with the investigation, was sentenced to two years and six months.

Flowers pleaded guilty to the same charges as the others and is to be sentenced Aug. 24.

The case was investigated by the IRS and U.S. Postal Inspection Service and prosecuted by Assistant U.S. Attorney Jamila M. Hall.