WASHINGTON – Rep. Nancy Pelosi and fellow Democrats who had tried to derail her bid to become House speaker announced they'd come to an agreement Wednesday that would all but ensure her election to the post.

As the price for winning decisive support from her opponents, Pelosi, a California Democrat, announced she was "comfortable" with a proposal for term limits on leadership positions within the Democratic caucus.

The deal will provide a clear path to victory for Pelosi to become the most powerful Democrat in government. That would give her a top role in confronting President Donald Trump during the 2020 presidential and congressional campaigns and put a woman at the helm of next year’s diverse crop of House Democrats.

"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 detailing a deal on term limits. "I am comfortable with the proposal, and it is my intention to abide by it whether it passes or not."

More:Who is the woman behind the caricature? Nancy Pelosi spars with President Trump

More:Democrats back Nancy Pelosi as next House speaker despite calls for fresh leadership

More:Nancy Pelosi wants to be House speaker again. Can she overcome opposition in her own party?

Term limits was an issue that kept a number of Democrats from supporting Pelosi, who previously served as House Speaker under President Barack Obama. Without term limits, frustrated younger Democrats felt unable to move up and take the reins in helping lead the party.

Pelosi's announcement was followed by a barrage of Democrats announcing their support for her speaker bid, highlighted by a joint statement from seven Democrats on Wednesday night.

The statement came from Reps. Ed Perlmutter, Bill Foster, Linda Sanchez, Seth Moulton, Tim Ryan, Filemon Vela and Rep-elect Gil Cisneros.

"We wish to thank Nancy Pelosi for her willingness to work with us to reach this agreement. 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 statement read. "We will support and vote for Nancy Pelosi for Speaker of the House in the 116th Congress."

Pelosi had already been nominated by Democrats to be speaker but to formally win the job, she must win a majority of votes – probably 218 – when the full House votes. Republicans will likely solidly oppose her.

Under the plan for term limits, top House Democrats would be limited to four two-year terms in their posts, including terms they’ve already served while the party had the House majority. Pelosi was speaker when Democrats controlled the House from 2007 until January 2011.

More:Nancy Pelosi fights for Democratic support in bid to reclaim speaker's gavel

More:More Democrats threaten to withhold support for Pelosi's House Speaker role

Opinion:Democrats owe Pelosi the chance to be Speaker. Their plot to deny her of it is foolish.

To be nominated to a fourth term under the plan, Pelosi would need to garner a two-thirds majority of House Democrats. Several aides said they believed restlessness by younger members to move up in leadership would make that difficult for her to achieve.

Pelosi’s opponents have said she and her top lieutenants should step aside for younger leaders.

Pelosi, No. 2 Democratic leader Steny Hoyer of Maryland and No. 3 leader James Clyburn of South Carolina are all in their late 70s. The new restrictions would apply to all of them.

Contributing: The Associated Press