(CNN) Legendary musician Stevie Wonder took both knees at a New York music festival, seemingly showing solidarity with NFL players criticized by President Donald Trump hours earlier.

"Tonight, I'm taking a knee for America; but not just one knee, I'm taking both knees," he said on stage Saturday before his performance at the Global Citizens Festival.

"Both knees in prayer for our planet, our future, our leaders of the world and our globe. Amen .. .

During the event, Wonder also spoke about interrupting hate, bigotry and condemning sexism.

Trump's comments

His remarks appeared to refer to Colin Kaepernick -- formerly with the San Francisco 49ers, but currently without a team -- who last year drew national attention for refusing to stand during "The Star-Spangled Banner" prior to kickoff.

"I am not going to stand up to show pride in a flag for a country that oppresses black people and people of color," Kaepernick said last year.

Trump is responding a year later, saying if fans would "leave the stadium" when players kneel in protest during the national anthem, "I guarantee, things will stop."

Trump said NFL owners should respond to the players by saying, "Get that son of a b***h off the field right now, he's fired. He's fired!"

Addressing the crowd before he performed, Wonder urged attendees to denounce bigotry and racism.

"Our global brothers and sisters, I didn't come here to preach, but I'm telling you, our spirit must be in the right place. All the time -- not just now, but tomorrow and whenever you, whenever you, whenever you need to interrupt hate, stand down bigotry, condemn sexism and find love for all of our global brothers and sisters every day," Wonder said.

He then took a knee with his son, Kwame Morris.

Other entertainers, athletes respond

Several sports stars have released statements criticizing Trump, including LeBron James, who called Trump a "bum" for his tweet uninviting Golden State Warriors' Stephen Curry from visiting the White House.