Two months ago, Senator Patty Murray, Democrat of Washington, was at risk of losing her seat.
Now, she is second in line to the presidency.
Ms. Murray, 72, was sworn in on Tuesday for her sixth term and was promptly elected as the president pro tempore of the Senate — a position that would normally put her third in the order of succession, after the vice president and the speaker of the House. But, of course, there is no speaker of the House.
The president pro tempore position traditionally goes to the longest-serving member of the majority party, and it was last held by Senator Patrick Leahy of Vermont, who has now retired. Ms. Murray, who has served in the Senate for 30 years, is second in seniority behind Dianne Feinstein of California, but she turned the position down.
In an interview Wednesday, Ms. Murray, after cheekily acknowledging that she was second in line, grew solemn as she reflected on the weight of the position and the history she had made as the first woman to hold the role.
“It’s not the trappings of it. It’s really the, the job of it,” she said. “I have a job to do and it’s really important, and I want to make sure that I’m successful at it.”
Ms. Murray fended off a challenge in November from her Republican opponent, the political newcomer Tiffany Smiley, to win another term.
She was first elected in 1992, part of what was then the largest class of women to join the Senate. In her campaign, she cast herself as “just a mom in tennis shoes,” someone who could understand the everyday concerns of suburban working mothers.
A former preschool teacher, Ms. Murray has made education a signature issue, serving as the chairwoman of the Senate health, education, labor and pensions committee. She has also advocated for abortion rights, especially in the aftermath of the Supreme Court’s overturning of Roe v. Wade, and for other issues that disproportionately affect women, including child care.
“It’s not lost on me the significance of what it means to be the first woman to serve in this role,” Ms. Murray said after getting the president pro tempore job. “This is another sign that, slowly but surely, Congress is looking more like America.”
Emily Cochrane contributed reporting from Washington.