Mayor Bloomberg signed into law yesterday the “Calvin Klein” bill to crack down on unruly fan behavior at sporting events.

The law makes trespassing on the playing area of a major sporting event a misdemeanor and includes jail time and fines “for the most unruly of fans,” Bloomberg said.

“All athletes deserve to be able to do their job without worrying that some unruly fan may assault them,” Bloomberg said at City Hall.

The measure was dubbed the “Calvin Klein” bill after a bizarre incident involving the fashion designer at a Knicks game in March. Klein caused a ruckus when he left his courtside seat mid-game and strolled over to guard Latrell Sprewell on the court and whispered something to him.

Security personnel escorted Klein off the court.

The law imposes fines of up to $25,000 and a year in jail.

It was supported by Major League Baseball and professional tennis.