The 20-year-old man who was arrested last month four days after AL.com published critical comments he made about Etowah County Sheriff Todd Entrekin has been released from jail amid a public outcry over his arrest.

Matthew Qualls accepted a plea deal last week that required him to plead guilty to first-degree marijuana possession, possession of a controlled substance and possession of drug paraphernalia, according to court records. He was initially arrested Feb. 22 on multiple charges including felony drug trafficking.

In exchange for accepting the deal, Qualls was released from custody on Friday and no longer faces the trafficking charge, which carries a mandatory minimum prison sentence. As a first-time offender he will participate in the Etowah County Drug Court program instead of going through the criminal court system, according to his Gadsden-based attorney, Sam Bone.

"If Mr. Qualls successfully completes the drug court program, his charges will be dismissed," Bone said via email. "In addition, if his charges are dismissed, he will be eligible to apply for an expungement of the entire criminal record of arrest and the criminal charges."

In order to satisfy the drug court requirements, Qualls must sign up for random drug screenings and complete substance abuse classes, Bone said.

A Feb. 27 AL.com article detailing Qualls's arrest has been viewed more than 196,000 times and reached the front page of the popular website Reddit. A number of Reddit users posted comments on the site stating that they called and emailed the Etowah County Sheriff's Office to voice their concerns about his arrest and demand that he be released. Facebook users from Etowah County and beyond also posted dozens of comments criticizing the way Qualls was treated.

Natalie Barton, a spokeswoman for the Etowah County Sheriff's Office, provided a brief statement Tuesday morning.

"Matthew Qualls was released from the Etowah County Detention Center on Friday," she said via email.

"The Etowah County Sheriff's Office does not have information concerning any court actions concerning Mr. Qualls. You will need to contact the Etowah County District Attorney's Office or his attorney."

The district attorney's office declined to comment Tuesday. The cellphone that Qualls used as of last month appeared to not be accepting calls on Monday or Tuesday, and his mother declined to comment.

Matthew Qualls was released from the Etowah County jail on Friday. (Etowah County Sheriff's Office)

Prior to the plea deal, Qualls faced years behind bars for charges stemming from his Feb. 22 arrest. The Etowah County Sheriff's Office charged him with being in possession of about 2.297 pounds of cannabis at the time of his arrest. Under Alabama state law, possessing more than 2.2 pounds of marijuana - the threshold for trafficking - carries a mandatory minimum sentence of three years in prison.

He did not possess pounds of marijuana buds or leaves, but was instead found to be in possession of a quantity of cannabis-infused butter, according to the police report.

"Once that marijuana was mixed with the butter then the whole butter becomes marijuana, and that's what we weighed," Phil Sims, deputy commander of the Etowah County Drug Enforcement Unit, said last week.

Qualls was arrested four days after AL.com published a story about some Alabama sheriffs personally pocketing tens of thousands of dollars allocated by federal, state and municipal governments to feed inmates in the county jails they oversee. The sheriffs argue that a state law dating to before World War II allows them to keep any of the funds that they do not end up spending to feed inmates.

On Jan. 5, two legal advocacy groups filed a lawsuit demanding that 49 Alabama sheriffs provide records of how they spend the inmate food funds. The lawsuit was the latest salvo in a years-long controversy over the practice.

A Feb. 18 article published by AL.com quoted Qualls as saying last month that Entrekin hired him in 2015 to mow the lawns at the Hokes Bluff homes of Entrekin and his parents. Qualls said the sheriff paid him $10 an hour over a period of several months via checks that had the words "Sheriff Todd Entrekin Food Provision Account" printed in the upper-left corner. AL.com has reviewed a photograph of one such check.

"I saw that in the corner of the checks it said Food Provision, and a couple people I knew came through the jail, and they say they got meat maybe once a month and every other day it was just beans and vegetables," Qualls told Al.com last month. "I put two and two together and realized that that money could have gone toward some meat or something."

Entrekin confirmed in a phone interview with AL.com last month that he does "have an account that says Food Provision on it," though he declined to provide any information about how the inmate feeding funds are used.

"The sheriffs are being sued statewide about how this money is being used ... I'm not commenting on that because there's a lawsuit pending," he said at the time.

Want access to the best analysis and in-depth reporting about Alabama each week? Sign up for the weekly Reckon Report newsletter and follow Reckon on Facebook and Twitter.