Former NBA star Amar'e Stoudemire has apologized for saying that he would avoid an openly gay teammate.

Stoudemire, who previously played for the Phoenix Suns and the New York Knicks, currently plays for Hapoel Jerusalem in the Israeli Premiere League.

Stoudemire and a group of players were asked by Walla Sport, an Israeli website, how they would feel about a gay teammate. All of the players except for Stoudemire answered that it wouldn't bother them.

“I'm going to shower across the street,” Stoudemire responded. “Make sure my change of clothes are around the corner. And I'm going to drive – take a different route to the gym.”

When asked if he was joking, Stoudemire answered that “there's always a truth within a joke.”

On Wednesday, Stoudemire issued an apology, saying that he was joking.

“I want to apologize for my offensive comments against the LGBT community. These remarks were taken from a larger interview where a reporter was asking me hypothetical questions, and all my answers had a comedic undertone. The answers I gave were meant to be taken as jokes & I am deeply sorry for offending anyone. I am open to creating a dialogue to assist the fight the LGBT community encounters daily and will continue to focus on playing basketball,” he said.

Out former NBA star John Amaechi called Stoudemire a “failed role model,” and compared him to President Donald Trump.

“These are serious times and we need serious people to lead important conversations, not petulant man-children spouting puerile prejudice,” he tweeted with the hashtag “RoleModelFail.” “There is already one too many of those holding court in the media, and the world is poorer for it. Within the world of sport there are plenty of true role models – on and off the floor – whose words are carefully chosen to uplift and integrate society, not join Trump and his grinning cabal in their 'locker room banter.' … Lastly, could someone please tell this man to stop flattering himself. It's embarrassing.”

In 2012, the NBA fined Stoudemire $50,000 for tweeting an anti-gay slur.

(Related: Amar'e Stoudemire fined $50,000 for anti-gay tweet.)