Nancy Pelosi has all but assured her ascent to speaker of the House after striking a deal with a rebellious group of Democratic lawmakers demanding fresh faces in leadership.

The agreement, which she announced on Wednesday, was the latest and perhaps most consequential hurdle that the Democratic leader from California has cleared in her bid to reclaim the speakership, a post that is second in line to the presidency. Pelosi, the first woman in American history to be speaker, held the gavel from 2007 to 2011.

The plan would bind the party’s leaders to a four-term limit as part of an effort to ensure opportunities for younger members of the party. It would apply retroactively, meaning Pelosi could only serve for an additional two terms, or four years.

“Over the summer, I made it clear that I see myself as a bridge to the next generation of leaders, a recognition of my continuing responsibility to mentor and advance new members into positions of power and responsibility in the House Democratic Caucus,” Pelosi said in a statement, which concluded with her saying she was “comfortable” with the term-limit proposal.

Moments later, several Democratic lawmakers announced that they would support the California Democrat in a floor vote on the House on 3 January, when the party regains control after winning a majority of at least 40 seats in the November midterms.

“We are proud that our agreement will make lasting institutional change that will strengthen our caucus and will help develop the next generation of Democratic leaders,” the rebellious lawmakers said.

Despite what appeared to be entrenched opposition to her leadership, Pelosi ran uncontested for the position during a caucus vote last month. Democrats overwhelmingly nominated her to be the next speaker by a margin of 203-32. But that was shy of the support she would need to win an absolute majority on the House floor, if all Republicans opposed her nomination as is expected.

“I have pushed for new leadership because I want to see generational change in the Democratic Caucus,” the Colorado congressman Ed Perlmutter, who led the negotiations between Pelosi and the rebel group, said. “I am now convinced that generational change has started and will continue to accelerate.”

The deal means that Democrats must prepare to clear the way for a new generation of leadership. Pelosi, 78, has sat atop her party for 16 years, assisted by her longtime deputies, congressman Steny Hoyer of Maryland, 79, and congressman James Clyburn of South Carolina, 79.

Nancy Pelosi would be the most powerful Democrat in government. Photograph: J Scott Applewhite/AP

The agreement followed weeks of furious behind-the-scenes negotiations. Pelosi had been unwilling to put a timeline on her tenure, arguing that it would make her a “lame-duck” speaker.

“Nancy Pelosi showed real leadership by agreeing to these reforms. But there’s also a lesson in all of this: tough conversations make us stronger, not weaker, and we need to keep having them if we’re going to deliver on the change that we’ve promised the American people,” said Seth Moulton, the Massachusetts congressman who led the revolt against Pelosi. “With the agreed-upon measures, we will do that.”

The issue of term limits has deeply divided the Democratic caucus and it is not certain that the rules changes would be approved. However, Pelosi said: “It is my intention to abide by it whether it passes or not.”

There are still several newly elected Democrats who campaigned on a promise to oppose Pelosi for speaker. Abigail Spanberger, an incoming freshman who narrowly defeated the Republican incumbent in a Virginia House race, said on Tuesday she intended to keep her “promise” to constituents and would oppose Pelosi for speaker.

Wednesday’s accord gives Pelosi a clear path to becoming the most powerful Democrat in government. It would also give her a top role in confronting Donald Trump during the upcoming 2020 presidential and congressional campaigns and put a woman at the helm of next year’s diverse crop of House Democrats.

Pelosi showcased that function on Tuesday, when Trump turned a White House meeting with Pelosi and the Senate minority leader, Chuck Schumer, into a nationally televised verbal donnybrook over the president’s demands for congressional approval of $5bn for his proposed border wall with Mexico. Pelosi won high marks from fellow Democrats for firmly but calmly going toe-to-toe with Trump.

The Associated Press contributed reporting.

﻿