A man hit Sacramento Mayor Kevin Johnson in the face with a pie at a charity dinner Wednesday night, and an official says the former NBA star went on the defensive.

The mayor’s chief of staff Crystal Strait called the Wednesday night incident at the Sacramento Charter High School a shocking assault, but said the mayor wasn’t hurt.

She said the mayor defended himself against the man, but she would not give details. The East Bay Express talked to witnesses who said Johnson tackled the suspect, 32-year-old Sean Thompson, and punched him repeatedly. One witness said Thompson was beaten to a “bloody pulp.”

Sacramento police said in a statement that police restrained Thompson, who has been arrested on suspicion of assaulting a public official. He was treated for a minor injury and is being booked into jail.

The mayor tweeted that he’s “doing fine” and said, “Thank you to Sac PD for being there.”

Johnson, a former NBA All-Star with the Phoenix Suns, has about two months left as mayor after deciding not to seek a third term. Johnson also has faced multiple allegations of molesting teen girls.