Former NBA star Amar'e Stoudemire on Wednesday apologized for his comments in which he said he would avoid a teammate if the player were gay.

"I want to apologize for my offensive comments against the LGBT community," Stoudemire said in a statement. "These remarks were taken from a larger interview where a reporter was asking me hypothetical questions, and all my answers had a comedic undertone."

In an interview with Israeli website Walla Sport, the 34-year-old Stoudemire said he would "shower across the street, make sure my change of clothes are around the corner," if he had a gay teammate.

Asked during the interview if he was joking, Stoudemire responded, "I mean, there's always a truth within a joke."

However, in Wednesday's statement, he said he was just being humorous about the whole interview.

"The answers I gave were meant to be taken as jokes, and I am deeply sorry for offending anyone," Stoudemire said.

The 6-foot-10 center is playing for Hapoel Jerusalem in the Israeli Premier League. Some teammates interviewed for the piece said they "wouldn't have an issue" with a gay teammate.

Stoudemire played 14 seasons in the NBA with the Phoenix Suns, New York Knicks, Dallas Mavericks and Miami Heat.

While he was playing for the Knicks, Stoudemire was fined $50,000 after he tweeted a gay slur at another user during the 2012 offseason. He issued an apology after that incident.