Rep. Nancy Pelosi, D-Calif., is on course to become the oldest person in history to hold the speaker's gavel now that she has secured a deal to give her at least two more years as the top House of Representatives leader.

Pelosi, now 78, will be almost 81 at the close of the 116th Congress, which ends on Jan. 3, 2021. That will make her nearly a year older than legendary Speaker Sam Rayburn, D-Texas, who died in office less than two months shy of his 80th birthday.

Pelosi will turn 80 on March 26, 2020, a little more than a year into her new speaker's term. She will achieve the milestone of oldest ever speaker on Feb. 7, 2020 — beating Rayburn's record. Pelosi will also be the first speaker since Rayburn to hold nonconsecutive terms.

Sen. Mitch McConnell, R-Ky., is already the oldest Senate majority leader in history. He will turn 77 in February and has no plans to retire or agree to term limits. The oldest holder of the position prior to him was Sen. Mike Mansfield, D-Mont., who was 73 when he left office in 1977.

Pelosi, who entered Congress in 1987, already holds the record as the first and only woman to serve as House speaker. Her age and longevity in leadership has attracted criticism from younger members who say the top leadership team excludes fresh faces and ideas.

Her deputy, incoming Majority Leader Steny Hoyer of Maryland, is nine months older than Pelosi. He’ll be 81 at the close of the next Congress. Incoming Majority Whip Jim Clyburn of South Carolina is two months younger than Pelosi.

Two records will be established when Pelosi is sworn in: She and McConnell will bring the combined ages of the leaders of the two houses of Congress to 154 years; and the combined age of the three top Democrats in the House will be 236 years and seven months.

By the end of their terms in 2020, the combined age of the Democratic leadership trio will be over 243 years — one year older than the United States is now. Pelosi and Hoyer first met when they were congressional summer interns together in 1963.

Congressional leaders will be serving with the oldest person first elected president. Donald Trump, 72, will be 78 if he is reelected and serves out two full terms — which would make him the oldest ever president, after Ronald Reagan, who was 77 when he left the White House.

Among the Democrats clamoring for someone different at the top is Rep. Seth Moulton of Massachusetts, who just turned 40, and Rep. Kathleen Rice of New York, 53.

They are among a group of insurgents who have argued the top leadership has been in power too long, depriving newer members a chance to advance.

Moulton was instrumental in securing a deal with Pelosi that would limit her to at most two more terms as speaker. Pelosi can only hang on to the gavel beyond the upcoming Congress if she can secure two-thirds majority support from her caucus.

If she pulls it off and wins an additional term, Pelosi would not surrender the speaker’s gavel until age 82 and nine months.

The term-limit proposal would apply to all top leaders and faces a February vote by the full Democratic caucus. But Pelosi said she will adhere to the limits whether the caucus votes for the rule change or not.

“I feel very comfortable about what they are proposing and it’s very responsible to do that, whether it passes or not,” Pelosi said Thursday.

Congress is one of the few places where ageism hasn’t pushed people out of top positions. In the Senate, Republican Strom Thurmond served as president pro tempore at the age of 98 and a half, although he required significant assistance from aides.

Current President Pro Tempore Orrin Hatch, R-Utah, is retiring at the end of the year at age 84 and nine months. Sen. Dianne Feinstein, D-Calif., 85, who is the top Democrat on the Senate Judiciary Committee was just elected to another six-year term.

The Judiciary Committee’s chairman, who will run the Finance Committee next year, is Sen. Chuck Grassley, R-Iowa, who is three months younger than Feinstein.

In January, the youngest member of Congress will be freshman Alexandria Ocasio-Cortez, 29, who backs Pelosi for speaker but has already shown she’s ready to challenge the leadership by protesting in Pelosi’s office with green advocacy groups.