Rep. Nancy Pelosi is set to be the next Speaker of the House after agreeing to serving a limit of two terms in the top spot, in return for support from Democratic holdouts that had been clamoring for generational change at the top of the party’s House leadership. The deal, the Washington Post reports, gave the longtime Democratic leader seven key holdouts and moved her above the 218 votes needed to secure a majority and the speakership during a floor vote Jan. 3rd. House Democrats nominated Pelosi as speaker by a 203-to-32 vote last month, but enough pledged to oppose her nomination on the floor vote to force Pelosi to the negotiating table.

Under the deal, according to the Post, Pelosi agreed to support a three-term limit for the top four posts in the House, unless a two-thirds majority of Democratic members want them to serve a fourth term. The term limits would be applied retroactively, meaning that Pelosi, as well as incoming House Majority Leader Steny Hoyer (D-Md.) and incoming House Majority Whip James Clyburn (D-S.C.), all of whom served in the same posts the last time Democrats were in the majority from 2007-2011, would be limited to one or two terms. The limits will not apply to committee chairs.

“Hours after the White House session [with Trump], [Pelosi] hashed out the final terms of the deal in her Capitol Hill office with Democratic Reps. Bill Foster (Ill.), Ed Perlmutter (Colo.) and Linda T. Sánchez (Calif.),” the Post reports. “Besides those three members, Reps. Seth Moulton (D-Mass.), Tim Ryan (D-Ohio) and Filemon Vela (D-Tex.), as well as Rep.-elect Gil Cisneros (D-Calif.) said Wednesday that they would back Pelosi.” According to the Post, 16 Democrats remain in open opposition to Pelosi’s reelection as Speaker, which means that she can currently afford to lose only a single Democratic vote and still have enough support. The vote on term limits in the caucus was agreed to be held by Feb. 15th.