PROVIDENCE, R.I. (AP) — A Rhode Island drywall contractor who according to authorities played a key role in cheating the Internal Revenue Service out of more than $2.8 million by paying some workers in cash was sentenced Thursday to three years of probation, although he will serve some time behind bars, prosecutors said.

Jesus Jose Mendez, 44, of Woonsocket, must spend every weekend during the first year of his probationary period in detention, according to the U.S. attorney’s office in Rhode Island. He was also ordered to pay the taxes.

Mendez was the co-owner J&J Drywall, Inc., a business incorporated in Massachusetts and operating in Rhode Island.

He and his business partner paid most of their employees cash to work around tax laws, prosecutors said.

The men from 2013 until 2017 used check-cashing businesses to cash more than 600 business checks totaling about $16 million, then went to work sites with backpacks full of cash that was used to pay their employees, prosecutors said.

They also failed to make required unemployment insurance contributions, authorities said.

They kept a small number of employees on an official payroll and paid by check.

Prosecutors said they also shorted the Massachusetts Department of Labor more than $60,000 in unemployment contributions.

Mendez pleaded guilty in April to wire fraud and conspiracy to defraud. His business partner remains a fugitive.