– Hours before she announced the House would investigate whether to impeach him, Speaker Nancy Pelosi received a call from President Donald Trump at her Washington home, ostensibly to talk about gun violence. But he changed the topic to Ukraine.

“He kept saying, ‘The call was perfect. When you see the notes, you’ll see the call was perfect,’ ” Pelosi recalled, sharing for the first time how Trump previewed a reconstructed transcript showing he had asked Ukraine’s president to investigate a political rival.

“Frankly, I thought, ‘Either he does not know right from wrong, or he doesn’t care.’ ”

After Wednesday’s vote, Trump will be one of two Washington figures to go down in the history books.

The other is Pelosi.

From the moment she ascended to the speakership in January, becoming the first woman to hold the office — not once, but twice — she has been the maestro of the unruly Democratic orchestra that built to its crescendo with an impeachment vote she sought to avoid. She has presided over the process with discipline and at times an iron fist.

When former Special Counsel Robert Mueller released his report documenting Russian interference in the 2016 election and 10 instances of possible obstruction of justice by Trump, a wave of Democrats began pushing to open an inquiry. In caucus conference calls and one-on-one meetings, she heard every one of them out — and patiently pushed back.

“I told her that we were struggling to justify why we were not moving forward,” Rep. Val Demings recounted. The speaker, she said, delivered a firm response about “arriving to the right place at the right time.”

When news of Trump’s pressure campaign broke, and Pelosi decided she could hold off no longer, she involved herself in every aspect of the impeachment inquiry. She met nearly every day — sometimes twice a day — with the leaders of the six committees that were investigating Trump.

She insisted on signing off on which witnesses would testify before the House Intelligence Committee, and she approved the wording of news releases, committee reports, and some of the high-profile statements her lieutenants would deliver in public. When Rep. Adam Schiff showed her his opening statement for the panel’s first impeachment hearing, Pelosi changed a single word — “was” to “is” — arguing the present tense made for a stronger argument.

For Wednesday’s debate, Pelosi reserved the first speaking slot for herself. “Our founder’s vision of a Republic is under threat from actions from the White House,” she said. “If we do not act now we would be derelict in our duty.”

Over the past week, as Pelosi has rolled out the final stages of the process, she has sequenced each step alongside popular, bipartisan legislation such as a defense policy bill, a $1.4 trillion government spending measure, and a sweeping North American trade agreement.

As the highest-ranking woman in Washington, Pelosi, 79, made her mark as a leader when Trump was still a reality TV host. She says she wants to be remembered not for impeachment but for her legislative achievements, primarily a politically complex push to pass the Affordable Care Act. But for better or worse, people in both parties say, her legacy is now wrapped up with Trump.

In many respects, Pelosi’s management of the impeachment process recalls the tactics she used to push through the Affordable Care Act and to work her way back into the speaker’s office. After the 2018 midterm elections, a number of incoming freshmen Democrats said they would not vote for her to be speaker.

“I was one of them; I thought it was time for new leadership,” said Rep. Dean Phillips of Minnesota. “And I’ve got to tell you, thank goodness. Thank goodness that we have Nancy Pelosi speaking for the House of Representatives, because I do not think there is a better, more qualified, more principled person for these circumstances.”