House Minority Leader Nancy Pelosi agreed to a deal to limit the length of terms for senior party leaders and committee chairs in Congress, which all but guaranteed she’ll be the next Speaker of the House on Wednesday night.

Pelosi announced the agreement through a press release. It read, in part:

For some time, there have been a number of conversations to advance a proposal to institute term limits for senior leadership positions in our Caucus. This proposal, which was developed by Members who care about the institution of the House of Representatives, would provide that Members in senior leadership positions can serve 3 terms with an additional term with two-thirds support of the Caucus. It would include the two terms of the Democratic Majority from 2007 to 2011.

With the term limits applying retroactively to the previous Democratic majority, Pelosi, Minority Whip Steny Hoyer and Assistant Democratic Leader Jim Clyburn are only able to serve a maximum of four more years. (RELATED: President Trump Puts Pelosi And Schumer On Notice)

Pelosi’s desire to be the next Speaker was no surprise. She was forced to meet with members of her own party to ensure she’d receive the necessary number of votes. With the Democrats holding 235 House seats in the next Congress, Pelosi cannot afford to have more than 18 Democrats vote against her.

Prior to the vote for the speaker nomination, a letter circulated among House Dems expressing their opposition to Pelosi. 16 members signed it. It read, “Our majority came on the backs of candidates who said that they would support new leadership because voters in hard-won districts, and across the country, want to see real change in Washington.”

Follow Mike on Twitter