President Trump asked for prayers for Arnold Schwarzenegger, his successor on "The Apprentice," at National Prayer Breakfast on Feb. 2 in Washington. (The Washington Post)

President Trump opened his first appearance at the National Prayer Breakfast in Washington with a prayer for the television ratings of the man who succeeded him as host of “The Apprentice.”

“They hired a big, big movie star, Arnold Schwarzenegger, to take my place. And we know how that turned out. The ratings went down the tubes,” Trump joked, prompting laughter from the audience. “I want to just pray for Arnold, if we can, for those ratings.”

The apparently ad-libbed monologue at the top of Trump's remarks came minutes after he was introduced by television and movie producer Mark Burnett, who helped Trump create the show.

Burnett recounted how he pitched the idea to Trump and his agent. Burnett and Trump noted that the agent hated the idea for the show. Trump said that he personally approved the idea with Burnett and later fired the agent after the show became a success.

“When I really fired him after it became the number one show, it became so successful and he wanted a commission and he didn't want to this,” Trump said of the agent.

The comments were an unusual start to the bipartisan breakfast. But they were not so unusual for a president who prides himself on putting on a good show and garnering good ratings.

He has taken Schwarzenegger to task in the past for low ratings and accused the former California governor of siding with his political opponent, Hillary Clinton.

Schwarzenegger fired back on Twitter with a video responding directly to the president's comments.

“Hey Donald, I have a great idea. Why don't we switch jobs,” Schwarzenegger said. “You take over TV, because you're such an expert in ratings and I take over your job and Then people can finally sleep comfortably again.”

Eventually, Trump seemed to return to his prepared remarks for the event.

He thanked his supporters for their prayers during the campaign and he recounted his trip to Dover Air Force Base to welcome home the remains of a U.S. service member killed in the line of duty.

“He died in defense of our nation,” Trump said of Chief Petty Officer William “Ryan” Owens. “He gave his life in defense of our people. Our debt to him and our debt to his family is eternal and everlasting.”

“We will never forget the men and women who wear the uniform,” Trump added. “Our security has been earned with their sweat and blood and tears.”

Trump spoke hours after using Twitter to comment on reports of a contentious phone call over the weekend with the Australian prime minister, which ended abruptly over the issue of refugees.

Trump was unhappy with a deal cut by the Obama administration with Australia to take in about 1,200 refugees, mostly from the Middle East, who are being held on two islands in the Pacific.

“Believe me, when you hear about the tough phone calls I’m having, don’t worry about it,” Trump said. “They’re tough. We have to be tough.

“We’re taken advantage of by every nation in the world, virtually,” he added.

Trump repeatedly returned to policy in his speech, defending an executive order that temporarily bars entry into the United States of travelers from seven predominantly Muslim countries and refugees worldwide. He framed the move as an effort to protect the country's safety and freedoms, including religious freedom.

“We will develop a system to help ensure that those admitted to our country fully embrace our values,” Trump said. “We want people to come into our nation, but we want people to love us and to love our values, not to hate us and to hate our values.

“We will be a safe country, we will be a free country, and we will be a country where all citizens will be free to practice their beliefs,” he added.

President Trump, speaking at the National Prayer Breakfast, promised to "get rid of and totally destroy the Johnson Amendment," which prohibits some tax-exempt organizations like churches from supporting political candidates, on Feb. 2. (The Washington Post)

The president also declared that he would work to repeal the Johnson Amendment, which prohibits some tax-exempt groups from endorsing political candidates. And he pledged to protect religious freedom.

“I will get rid of and totally destroy the Johnson Amendment and allow our representatives of faith to speak freely and without fear of retribution,” Trump said. “I want to express clearly today to the American people that my administration will do everything in its power to defend and protect religious liberty in our land.”