Atlanta Hawks forward Thabo Sefolosha (right) arrives at court on Oct. 7 along with ex-teammate Pero Antic, who was also involved in the scuffle.Steven Hirsch/New York Post

Atlanta Hawks player Thabo Sefolosha testified Wednesday that he sustained the injury that shelved him for the NBA playoffs when an NYPD cop kicked him in the leg after he tried to give a beggar cash.

The Swiss national, wearing a royal blue suit and plaid tie, said that he had just reached into his pocket to retrieve a $20 bill to hand to panhandler Amos Canty when about four officers jumped him.

“They [the police] never gave me a direct order, one is pulling me on the left, one is pulling me on the right, one has his hand on the back of my head,” said Sefolosha, 31, at his misdemeanor trial in Manhattan Criminal Court. “I couldn’t really move, I felt my leg going up, somebody kicking me on my right leg.”

Amos Canty, the homeless man who allegedly witnessed the altercation between Thabo Sefoloshoa and NYPD officers.Steven Hirsch/New York Post

Sefolosha said the altercation began as he and then-teammate Pero Antic exited the club. Cops were clearing the entire block after a stranger stabbed Copeland in the gut.

Officer John Paul Giacona was rudely yelling, “Get the f—k out! This is the New York Police, you got to get out!”

As Sefolosha and his pals walked, Giacona continued cursing at them.

“He said with or without a badge I can f—k you up,” he recounted the cop telling him. “I laughed a little bit and said, ‘Ok, well, you’re 5’2” if you saw me in a different place, you wouldn’t say that. You’re a midget. I kept moving.”

When Sefolosha reached Tenth Avenue and was about to get into his car, panhandler Canty asked him for a handout.

“I asked him, “Yo, man, look out for a brother, and he went to give me money,” Canty, chomping on a wad of gum, testified for the defense before Judge Robert Mandelbaum. But before Canty got his hands on it, cops tackled Sefolosha to the ground, he said.

During the scuffle, Sefolosha’s right leg was fractured.

Prosecutors offered to dismiss the charges against Sefolosha if he did 1 day of community service, but he rejected the deal.