An emotional Eric Cantor announced to GOP lawmakers Wednesday that he would relinquish his post as House Majority Leader on July 31.

He then held a press conference to announce his decision, saying he plans to keep his post until the end of next month despite the announcement by House Speaker John Boehner, R-Ohio, that new leadership elections will be held June 19.

“I will be stepping down as majority leader,” Cantor said. “It is with great humility that I do so, knowing the tremendous honor it has been to hold this position.”

In a brief closed-door meeting, Cantor told Republicans he was grateful for his time in leadership and would move forward without regret.

He received five standing ovations and prompted Boehner to shed a few tears as he delivered his remarks, say lawmakers who were in the room.

“Never more gracious, noble sentiment was expressed in that room than his,” Rep. Trent Franks, R-Ariz., said after the meeting ended.

Boehner paid tribute to Cantor, who has served as majority leader since 2011, by quoting Winston Churchill: “Success is not final, failure is not fatal, it is the courage to continue that counts.”

Boehner told the room, “This is a speech I never expected to give.”

Cantor announced his decision to resign from his post as majority leader a day after unexpectedly losing to his primary challenger, university professor Dave Brat.

Lawmakers who left the meeting said the mood was somber.

“There was a lot of applause for his service and his dedication for our country,” Rep. Mark Meadows, R-N.C., said. “It’s a tough time for him and all of us know that we serve at the whim of those people who vote for us. There was a lot of emotion and concern and empathy for Eric.”

But Cantor's imminent departure also brought excitement among a faction of House conservative Republicans who have clashed with him over spending and immigration reform.

They are hoping Rep. Jeb Hensarling, R-Texas, who is considered more conservative than Cantor, will run to replace him.

“It was somber and very appreciative of Cantor,” Rep. Matt Salmon, R-Ariz., said of the meeting. “But you know, we’re moving on.”

In addition to Hensarling, Reps. Pete Sessions, R-Texas and Kevin McCarthy, R-Calif., are vying to replace Cantor on the leadership team.

Boehner told lawmakers he would remain as speaker and continue push the GOP agenda, which leadership aides said will not include immigration reform, which has deeply divided the conference.

“This is the time for unity,” Boehner said. “The time to focus on the thing we all know to be true: the failure of Barack Obama's policies and our obligation to show the American people we offer them not just a viable alternative but a better future.”