A man now facing felony hate crime charges for his alleged racist rant at a Loop Starbucks over the summer was released from police custody Monday after posting the requisite 10 percent of his $50,000 bail.

William Boucher, 24, faces four counts of aggravated battery in a public place and four counts of committing a hate crime, according to Cook County court and sheriff’s office records.

Boucher was initially only charged with three misdemeanor counts of battery, but a no-bond warrant was issued for the new charges in August, according to court records.

On Monday, Boucher appeared before Judge Arthur F. Hill Jr., who set bail at $50,000, according to the Cook County state’s attorney’s office. He is next scheduled to appear in court Oct. 23.

Court records show Boucher was released from custody Monday. His attorney could not be reached for comment.

On the afternoon of June 6, someone accidentally spilled a drink on Boucher’s pants at the Starbucks at 40 W. Lake St., and the Rogers Park resident “became irate,” police said at the time.

He left the Starbucks and punched a 59-year-old homeless man “unprovoked,” police said. He also allegedly spit on Gerald Mitchell, 30, and a 34-year-old woman, both of whom are black.

None of the three could be reached for comment Monday afternoon.

In the video, Boucher can be heard using racial slurs against African-Americans, including telling one man: “Your children are despicable vermin.” The tirade was captured on video by an ABC7 photographer who happened to be in the coffee shop.

He tells another person to “Shut up, slave;” and yells at another “Get on all fours. You don’t deserve to walk on two legs,” according to the video.

After starting to walk away, Boucher punches the apparently homeless man, and is then grabbed and taken to the ground by two other men, one of whom was Mitchell. He said Boucher spit in his face and kneed him repeatedly as he held him down for 13 minutes until police arrived.

“He said a lot of stuff that didn’t make it on the video,” Mitchell told the Chicago Sun-Times in July.

“I try to see the good in people,” Mitchell said. “I don’t know his background. I would try to give him the benefit of the doubt. I just know it was downright wrong. Disgusting.

“I hope he learns something from this,” Mitchell said.

Boucher declined to discuss his case with a Sun-Times reporter at a previous court hearing.

A Starbucks spokesperson said in a statement: “We have absolutely no tolerance for this type of behavior in our stores, and are grateful to the partners (employees) and customers who stepped in to help until officers arrived.”

In the last 12 months, at least eight other people have been charged with committing hate crimes in Cook County, according to Sun-Times records. In those incidents, suspects allegedly targeted a synagogue; a Hispanic church; a mentally challenged man; an employee of the Council on American-Islamic Relations; and an African American couple.