President Trump, Vice President Pence and House Speaker Paul D. Ryan (R-Wis.) applaud on Capitol Hill following the president's address to a joint session of Congress on Feb. 28. (Alex Brandon/Associated Press)

The University of Notre Dame announced Thursday that Vice President Pence will speak at its graduation in May, ending months of speculation and campus protests over whether the school would invite President Trump to deliver the commencement address.

Four of the past six presidents — Barack Obama, George W. Bush, Ronald Reagan and Jimmy Carter — accepted Notre Dame’s invitation in their first year in office to deliver the commencement address and receive an honorary degree. Some Notre Dame students, anticipating that the nation’s most prominent Catholic school would ask Trump to do the same, launched a petition in December asking the Notre Dame president, the Rev. John Jenkins, not to do so. They argued that Trump’s words and actions were antithetical to the school’s values and mission.

The petition was signed by thousands of Notre Dame students and faculty members, and there have been protests on the campus in South Bend, Ind., including one Monday in which students demanded to know what the university was going to do.

But many other students and alumni wanted the university to follow tradition and invite the president to speak in his first year, saying it would be an honor to have the country’s leader address graduates.

“It goes beyond politics. It is not an endorsement of policy; it is an engaging of the office and showing respect for it,” said Dylan Stevenson, 22, a senior and vice president of the Notre Dame Republicans. “Simply because Donald Trump has said things that some might consider a bit off color, I don’t think that’s just grounds for not inviting him.”

Mylan Jefferson, 21, a senior and co-chair of the university’s diversity council, was opposed to inviting Trump.

“He has had so much hateful rhetoric in his campaign and since he has been president,” Jefferson said. “The actions and words that Donald Trump uses directly contradict our mission statement It would allow all of the attention to go to Trump instead of to all of our graduates who have worked so hard to get here.”

Pence will be the first vice president to deliver Notre Dame’s commencement address. The school hailed the former congressman and Indiana governor as a natural choice.

“It is fitting that in the 175th year of our founding on Indiana soil that Notre Dame recognize a native son who served our state and now the nation with quiet earnestness, moral conviction and a dedication to the common good characteristic of true statesmen,” Jenkins said in a statement.

Stevenson said in an email that while he would rather have had Trump speak at commencement, it will still be an honor to have Pence there.

“I was thrilled when he was chosen as Trump’s running mate, so I’m looking forward to it,” he wrote.

Samuel Cho, a student who opposed inviting Trump to speak, said he was unhappy that Pence would be there in his stead. Cho cited actions that Pence took on LGBT issues. As governor, Pence in 2015 signed the Religious Freedom Restoration Act, a law that opponents said enabled businesses to refuse service to lesbian, gay, bisexual or transgender customers. The law was amended after protests and boycott threats from around the country.

“As a student of the LGBTQ community on campus, I am at a loss for words,” Cho said. “A vice president has never been the commencement speaker, and for Mike Pence to be the first one is, honestly, a slap in the face.”

There is a long-standing tradition of presidents speaking at two or three university commencements a year. Along with the military academies, Notre Dame has been a favorite spot for White House residents. (President George H.W. Bush spoke there in 1992, during the last year of his term.) Many at Notre Dame protested when Obama spoke there in 2009, citing his support of abortion rights.

The debate over whether to invite Trump was similarly heated at times and lingered over the campus for months.

Other colleges are likely to face similar backlash from students and alumni if they invite the president to deliver a commencement address, the presidential historian Douglas Brinkley said.

“Having the president be your commencement speaker is usually winning the big prize, but in the age of Donald Trump in the White House, it might be an albatross around the university’s neck,” Brinkley said. “2016 was the nastiest election on record, and we’re in the middle of a cultural war. . . . So if you give protesters a time that Donald Trump is going to be giving a commencement address, the amount of acrimony surrounding it could lose the message, which is that the stars of the day are supposed to be the students who are graduating.”

The U.S. Naval Academy recently confirmed that it has invited Trump to deliver its commencement address. Obama and George W. Bush also gave commencement addresses at the academy during their first years in office.