Nearly two dozen people — among them nine physicians — were charged on Tuesday in connection with a Medicaid fraud scheme that lured thousands of low-income patients to medical clinics for unnecessary services in exchange for free shoes, Brooklyn District Attorney Ken Thompson said.

The 23 defendants named in the 199-count indictment earned nearly $7 million between October 2012 and September 2014 in the "Medicaid mill," Thompson said.

They promised free footwear to poor city residents if they could prove they had a valid Medicaid card and submitted themselves to exams or tests, Thompson said.

"At the heart of this health care fraud scheme was the exploitation of poor people, the most vulnerable people in our society," Thompson said during a news conference at his Brooklyn office. "These defendants exploited poor people to make money."

The scheme operated throughout the city in neighborhoods like Brownsville, Bushwick, Richmond Hill, Jamaica, and areas of the Bronx, Thompson said.

Patients were loaded into vans after being recruited from institutions like homeless shelters, and welfare offices across New York City under the direction of the scheme's ringleader, Eric Vainer, Thompson said.

"The volume was his gig," Thompson said, referring to Vainer. "The goal was to get as many people in the van as possible to get to one of these clinics. And this was done, we allege, day after day for two years."

Vainer, 43, who owned some of the clinics, was taken into custody this week in Florida while on vacation. He could not be reached for comment.

Thompson played an audio recording at the news conference he said captured Vainer saying the key was to build up the business and then they "could use the same patients like guinea pigs for anything we want."

A videotape Thompson played showed a man he identified as the scheme's chief recruiter, Bernard Rorie, 59, of Brooklyn, announcing the footwear offer outside an East New York soup kitchen.

"Sneakers, shoes, and boots today," the man shouted to people outside the soup kitchen.

At least one of the clinics advertised in newspapers, including amNewYork.

Prosecutors said Rorie took potential victims' Medicaid cards to the van in order to make sure they were valid. He would then load the patients into the van and drop them at one of the clinics, prosecutors said.

Rorie was arraigned in Brooklyn yesterday morning and held in lieu of $50,000 bail. He pleaded not guilty and his next court appearance is scheduled for May 19. Attorney information for Rorie was not immediately available.