A former Near West District sergeant with the Chicago Police Department was sentenced to six months in federal prison Thursday for selling information obtained from police databases to a liquor store clerk.

Ray M. Ramirez, 53, admitted in a plea deal he traded information obtained from police databases to the clerk for cash payments of $150 to $200, according to the U.S. attorney’s office.

The information he gave the clerk included a criminal-background check on a prospective store employee, a vehicle-registration check and a review of police incidents in and around the store, according to prosecutors, who said Ramirez also admitted shaking down the clerk and other store employees for payments ranging from $70 to $200 — at times while he was on-duty and in uniform.

After pleading guilty last year to a misdemeanor count of exceeding his authorized use of a police department computer, he was sentenced Thursday by U.S. District Judge Ronald A. Guzman.