WASHINGTON -- President Trump addressed graduates at Liberty University, the Christian school whose leader was among Mr. Trump's earliest and most vocal supporters.

Mr. Trump's remarks Saturday on the Lynchburg, Virginia, campus marked his first commencement address as president, and his first extended public appearance since he fired James Comey as FBI director this week.

Jerry Falwell Jr., Liberty's president, introduced the president and presented him with an honorary doctorate. Falwell said the commencement crowd numbered more than 50,000, the highest ever for the school. He praised Mr. Trump for an executive order allowing the IRS to use discretion when enforcing a law that bans political spending by tax-exempt entities, most notably churches.

President Donald Trump gives the commencement address for the Class of 2017 at Liberty University in Lynchburg, Va., Saturday, May 13, 2017. Pablo Martinez Monsivais / AP

The president's speech focused on the graduates' future and, to some extent, the future of religious freedom in the U.S. Mr. Trump mentioned the "great signings" that took place in the White House last week, referring to the executive order.

Get Breaking News Delivered to Your Inbox

"As long as I am your president, no one is ever going to stop you from practicing your faith," Mr. Trump told the graduates.

Mr. Trump referred to his unlikely political rise throughout the address. He urged the students to "be totally unafraid to challenge entrenched interests and failed power structures," adding, "Does that sound familiar?"

The former reality TV star who had never before held public office told graduates to "embrace the label" of being an outsider, saying outsiders "change the world and make a real and lasting difference."

Mr. Trump said the more that people say something can't be done, "the more you should be absolutely determined to prove them wrong."

Members of the Class of 2017 stand as they wait for the arrival of President Donald Trump at Liberty University in Lynchburg, Va., Saturday, May 13, 2017. Pablo Martinez Monsivais / AP

Falwell, Liberty's president, helped Mr. Trump win an overwhelming 80 percent of the white evangelical vote in 2016. He became a key surrogate and validator for the thrice-married Mr. Trump during the campaign, frequently traveling with Mr. Trump on the candidate's plane and appearing at events. Falwell often compared Mr. Trump to his later father, the conservative televangelist Jerry Falwell, and argued that while Mr. Trump wasn't the most religious candidate in the race, he was the man the country needed.

Mr. Trump has spoken at Liberty University before. He courted Christians there in January 2016 with a speech that drew laughs from some in the audience when referred to one of the Bible's books as "Two Corinthians" instead of the more common "Second Corinthians." In that speech, Mr. Trump promised: "We're going to protect Christianity, and I can say that. I don't have to be politically correct."

Newly elected U.S. presidents often give their first commencement addresses at the University of Notre Dame, the country's best-known Roman Catholic school.

Presidents Barack Obama, Jimmy Carter, Ronald Reagan and George W. Bush did so during their first year in office. But this year, Vice President Mike Pence will speak at Notre Dame's graduation, becoming the first vice president to do so.