After their performances, the Broadway casts of Hamilton and The Color Purple paid tribute to Prince, the beloved music icon who died on Thursday at 57.

They sang their faces off. Led by Prince's friend Jennifer Hudson, the cast brought the house down with a rousing rendition of his hit "Purple Rain."

"I did not expect to have to speak tonight, but God has his way," said Hudson, who plays Shug Avery in the musical. "As we all know, today we lost a legend. Jesus, we lost a legend who was a good friend of mine, Prince, who was dear to all of us."

Hudson said Prince had invited her to one his events and insisted that she bring her cast members along. "We were honored to be in his presence one last time and we got to have that moment," she said.

"He said his music will live on and he will live through his music, so we want to keep him alive today with this song," Hudson added before the show's star, Cynthia Erivo, who plays Celie, kicked off the performance.