WASHINGTON — House Minority Leader Nancy Pelosi announced Wednesday that she had reached a deal with dissidents who have been pushing for new Democratic leadership that ensures the California Democrat has the necessary votes to be elected speaker next month.

Under the agreement, members serving in the top spots in House Democratic leadership would only be allowed to serve in their roles for three terms before needing a two-thirds majority in the caucus to be elected to a fourth term. Leaders are currently not subject to term limits and only require a simple majority to win election.

"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.

For Pelosi, 78, to be elected speaker in January, she needs to win a majority of the full House present and voting during a formal floor vote after the new Congress convenes. She previously served as speaker from 2007 to 2011, which spanned the administrations of President George W. Bush and Barack Obama.

The deal flips seven "never Pelosi" members to her side: Bill Foster of Illinois; Ed Perlmutter of Colorado; Linda Sanchez of California; Seth Moulton of Massachusetts; Filemon Vela of Texas; Tim Ryan of Ohio and Gil Cisneros of California.

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

That group would help get Pelosi over the top on the Jan. 3 vote to reclaim the gavel and provide cover to others — especially certain freshman members — who stated on the campaign trail that they wouldn't back her for speaker and can't afford to renege on that promise.

The change would affect not only Pelosi but three top leadership posts, including Democratic whip Steny Hoyer, D-Md., who's expected to serve as House majority leader in the new Congress, and assistant Democratic leader James Clyburn, D-S.C., who will serve as Democratic whip.

Hoyer has adamantly opposed to term limits for leaders, telling reporters Tuesday that Pelosi is "not negotiating for me."

House Democrats nominated Pelosi to serve as speaker during a closed-door, secret ballot vote last month. Ahead of that vote, despite a long-simmering insurgency against her bid, the rebellion crumbled in the days leading up to that internal caucus election.

At the time, Pelosi reached a deal with a group within the bipartisan Problem Solvers Caucus in which she agreed to several rules changed that would kick-start a process that would more easily bring bills with at least 290 co-sponsors to the floor. Others included a measure that would increase committee transparency and ensure that a majority of members of a committee can request and schedule a markup.

The possibility of the deal was first reported by Politico on Tuesday.