Prime Minister Justin Trudeau surprised the cast and audience at Come From Away on Broadway Wednesday night by taking the stage ahead of the show to speak, touting the importance of friendship between the U.S. and Canada.

Trudeau spoke just before the performance in New York City. He is in the city to take in the Broadway musical for the first time.

Broadway musical tells story of Newfoundlanders and stranded passengers following 9/11 6:59

Donald Trump's daughter Ivanka Trump was also at the performance on Wednesday night, alongside Nikki Haley, the U.S. representative to the United Nations.

When Trump arrived, she spoke with several Canadian and Newfoundland and Labrador politicians, including MP Judy Foote.

Prime Minister Trudeau speaks about immigration and has a message to Ivanka Trump who was in attendance 1:42

The mayors of Gander and Appleton, N.L., both greeted Trump. The men inspired characters in Come From Away.

Trump is an important adviser to her father, and several people remarked it was ironic for her to be attending a musical about welcoming strangers in times of need — while the contentious American travel ban is litigated once again in court.

'Oh, she enjoyed it'

Despite a difference in opinion and policy the two countries have on refugees and immigrants, Trudeau reiterated the significance of Canada having a strong connection with its neighbour to the south.

Ivanka Trump attended the performance of Come From Away on Wednesday night in New York. She spoke with several Canadian politicians. (Ryan Remiorz/Canadian Press)

"We're always going to have differences of approaches on certain issues, but the fundamental hopes for the future, the responsibilities of keeping people safe, and building a better future for the kids is something that we can always agree to," Trudeau told CBC News, after the show.

Trudeau greeted Ivanka Trump after the show was over.

Asked about her attendance, Trudeau said, "Oh she enjoyed it. As did everyone in the theatre."

"No relationship" quite like Canada and the U.S., Trudeau says, adding show is also about friendship <a href="https://twitter.com/hashtag/cbcnl?src=hash">#cbcnl</a> —@arianakelland

Prior to the show's start, Trudeau toasted the innovation and problem-solving of the residents of Gander, N.L., who, he said, came together in a big way to help the stranded passengers after the Sept. 11 attacks. He told one story of how Newfoundlanders managed to prepare a vast amount of food for thousands of extra people.

"Alf [Richardson] from the Salvation Army thought about it and realized that they could just turn the local hockey rink into the world's largest walk-in refrigerator," he said.

"That sort of example of everyone coming together and making things happen is, I know, what this story is all about."

Written by Canadians David Hein and Irene Sankoff, Come From Away tells the stories of the nearly 7,000 grounded travellers after Sept. 11, 2001, who landed in Gander and the townspeople who helped them.

"The world gets to see what it is to lean on each other and be there for each other through the darkest times" <a href="https://twitter.com/JustinTrudeau">@JustinTrudeau</a> <a href="https://twitter.com/hashtag/ComeFromAway?src=hash">#ComeFromAway</a> <a href="https://t.co/Q5mODQSsA1">pic.twitter.com/Q5mODQSsA1</a> —@ChrisEnsingCBC

The show officially opened Sunday night with much fanfare, after successful runs in previews.

​Rare for PM to attend Broadway show

Michael Paulson, the theatre reporter with the New York Times, said the Consulate General of Canada booked 500 seats for Canadians and friends of Canada in New York for Wednesday night's show.

"[Trudeau's] someone who supports refugees, it's part of his public policy, and he's someone who ran for office celebrating the arts," Paulson said.

Paulson said he cannot think of another example of a foreign leader attending a Broadway show

"[Former] president Obama would come to shows every once in a while, and President Trump used to come to Broadway shows long before he became president," he said.

"I don't think we'll see much of him given the difficult encounter his vice-president had at Hamilton."

Having one head of government attend a Broadway musical is rare. But having the ear of both the prime minister and a close advisor to the president is even more unusual.

The publicity boost could go a long way to Come From Away making back the $12 million cost of the show.