A passenger on an MTA bus in Brooklyn punched another rider while shouting an anti-white statement in an unprovoked attack, police said.

The suspect walked up to the rider on the B25 bus and said, “I hate all you white motherf—–s,” as the bus drove down Fulton Street in downtown Brooklyn on Monday morning, cops said.

He then slugged the 29-year-old man in the face, according to police. The punch caused the victim’s face to bruise and swell.

The suspect got off the bus at the corner of Fulton and Bond streets, cops said. He was last seen on Bond Street, wearing a black baseball hat, a black sweatshirt and sunglasses. Police said he’s about 5-foot-10 and weighs about 200 pounds.