It was his turn to get knocked out.

The NYPD’s Hate Crimes Task Force busted a Brooklyn man for at least seven “knockout” assaults, cops said Friday.

Barry Baldwin, 35, punched out the victims between Nov. 9 and Christmas Eve in Canarsie and Midwood, police said.

All of the victims were white women and most were Jewish, a law-enforcement source said. At least two of the attacks occurred on the Sabbath.

“Everyone will sleep a little easier,” said Brooklyn Assemblyman Dov Hikind, who said the attacks frightened the community.

On Nov. 9, Baldwin allegedly socked a 78-year-old Midwood woman while she pushed her great-granddaughter’s stroller at Avenue L and East Fifth Street.

The elderly victim was knocked to the ground in the unprovoked attack.

Nearly a month later, he punched a 20-year-old in the head, at around 2:40 p.m. on Dec. 7, cops said.

Baldwin’s next target was a 33-year-old mom walking with her 7-year-old daughter on Elm Street near East 12th Street on Dec. 21 in Midwood, cops said.

The victim fell onto the child before crashing to the ground, police said. She suffered cuts and bruises to her head, hands and knees, according to a Criminal Court complaint.

A 78-year-old sitting in on a bench in Canarsie was the next to suffer the crazed attacker’s wrath on Christmas Eve. Fifteen minutes later, he attacked another elderly woman nearby at corner of East 93rd Street and Seaview Avenue, court ­papers charge.

A 38-year-old woman ducked Baldwin’s swing when he attacked her on Dec. 26, on Seaview Avenue in Canarsie, cops said. The next day, he attacked his final victim on the same street while she talked on a cellphone, police said.

Baldwin, of East New York, has no prior arrests.

He was charged with six counts of assault as a hate crime, aggravated harassment and attempted assault.

Prosecutors tacked on menacing charges and one count of endangering the welfare of a child for punching out the mom who fell onto her 7-year-old.

Hikind said the arrest was welcome news. “No one in our community should live in fear,” he said.