A black man who said he was being treated for pneumonia and asthma at an Illinois hospital was arrested with two others after going for a walk outside wearing a hospital gown and wheeling his IV equipment.

Shaquille Dukes wrote in a Facebook post that he was admitted to a Freeport hospital for double pneumonia while on vacation in the beginning of June. He said he was told by doctors to walk around for a little while, so he went outside.

Shaquille Dukes is arrested by police in his hospital gown. via Facebook

But Dukes was stopped by a hospital security guard, "who claimed that I 'was trying to leave the hospital to sell the IV equipment on eBay,'" he wrote.

The guard called the Freeport Police Department, and several officers arrived, video of the incident shows.

Dukes said police told him he was being arrested for attempted theft "of the IV equipment that was clearly attached to my arm." He said that when he informed the arresting officer that he was being treated at the nearby hospital, the officer said "'I don't care why you're here, you're going to jail.'"

Dukes wrote that his IV was removed, "and it was NOT by a doctor," and his rescue inhaler was taken away from him.

He said while he was being driven to jail, he started to have a seizure and asthma attack, but officers did not return the inhaler for nearly four minutes. "When I became unresponsive, it miraculously appeared," Dukes wrote.

The Freeport Police Department said in a statement that Dukes' IV was removed by a staff member of the hospital, Freeport Health Network (FHN), at the patient's request.

The statement said police were called to the scene on June 9 because an FHN employee had called them to report Dukes and two others. All three were arrested for disorderly conduct, and two face charges of resisting or obstructing a peace officer.

The three men, who are from the Chicago area, were released after they were charged, police said.

Police asked "the public to reserve judgment while a complete review of the incident is performed." A later statement from the city of Freeport and police said that body camera footage was captured during the exchange.

Police asked for an independent investigation into the incident after receiving a formal complaint from the patient "alleging unfair and biased conduct by responding officers," the statement said.

Mitch Davis, the chief of police in Hazel Crest, Illinois, who serves on the Illinois Association of Chiefs of Police and the National Organization of Black Law Enforcement Executives, will lead the investigation.

"We have every reason to expect his investigation will be thorough, complete and objective," the statement said.

Dukes said his brother was one of the other people arrested. "This is truly one of the most racist cities in America," Dukes wrote. "This ends today."