President Donald J. Trump was impeached on Wednesday.

For the third time in the nation's history, the House of Representatives voted to impeach a sitting president, acting after a daylong debate on whether Trump violated his oath in pressuring Ukraine to damage a political opponent.

Trump was impeached on two articles. The first vote, 230-197, accused him of abuse of power and was almost entirely on party lines; it was followed quickly by a second, 229-198, vote accusing the president of obstructing Congress. The one-vote difference was that of Democrat Jared Golden of Maine, who voted yes on abuse of power and no on obstruction.

No Republicans voted against Trump. Two Democrats, Jeff Van Drew of New Jersey, who is expected to switch parties soon, and Collin Peterson of Minnesota, voted with Republicans against both articles. One Democrat, Tulsi Gabbard of Hawaii, who is running for president, voted "present" on both articles.

The trial in the Republican-controlled Senate on whether to remove the president from office will likely begin in early January. It is likely that Trump will be acquitted, because a two-thirds majority is required for conviction.

Minutes before the vote on Wednesday night, Trump took the stage at a campaign rally in Battle Creek, Michigan.

"It doesn't really feel like we're being impeached," he told the cheering crowd. "The country is doing better than ever before. We did nothing wrong. And we have tremendous support in the Republican Party like we ave never had before. Nobody has ever had this kind of support."

Download the NBC News app for full coverage of Trump's impeachment

Hours before the vote, Speaker Nancy Pelosi, D-Calif., took to the House floor to say it was imperative to impeach a president for the first time in two decades because Trump is "an ongoing threat to our national security and the integrity of our elections."

"It is an established fact the president violated the Constitution," Pelosi said, standing next to a sign with aa U.S. flag that quoted a line from the Pledge of Allegiance: "To the Republic, for which it stands ..."

Emotions ran high inside the Capitol ahead of the vote, with Democrats and Republicans accusing one another of acting in bad faith during 10 hours of debate.

Speaking on the floor, Rep. Debbie Lesko, R.-Ariz., said, "I believe this is the most unfair, politically biased rigged process that I have seen in my entire life."

"This is the most partisan impeachment in the history of the United States," she added. "Not one Republican voted for it in the Judiciary Committee. ... Not one Republican, I don't think, is going to vote for it here today."

Democrats accused their counterparts of willfully turning a blind eye to the president's misdeeds. They said there was ample evidence that Trump had abused his power by pressuring Ukraine to announce investigations into former Vice President Joe Biden and his son while withholding almost $400 million in aid, and that he had obstructed Congress by refusing to release any documents related to his actions.

"The president withheld congressionally approved military aid to Ukraine, a country under siege, not to fight corruption, but to extract a personal political favor," said Rep. Jim McGovern, D-Mass. "The president of the United States endangered our national security. The president undermined our democracy ... betrayed his oath to preserve protect and defend the Constitution of the United States."

"No one should be allowed to use the powers of the presidency to undermine our elections. Period," McGovern added.

The hours of back and forth before the vote offered no new evidence and shed no new light on the allegations against the president, as Republicans and Democrats mainly echoed many of the same points they've been making for weeks.

The proceedings were mostly civil, although some Republicans amped up the hyperbole. Rep. Barry Loudermilk of Georgia said Jesus got a fairer trial from the Roman governor who sentenced him to crucifixion than Trump had gotten from House Democrats.

"When Jesus was falsely accused of treason, Pontius Pilate gave Jesus the opportunity to face his accusers," Loudermilk said said on the House floor. "During that sham trial, Pontius Pilate afforded more rights to Jesus than Democrats have afforded this president in this process."

A White House official told NBC News that Trump did not plan to watch the proceedings but would keep tabs on the coverage. The official said the White House was preparing for "war."

"We are all mad," the official said, and Trump and his team are "angry this is happening."

The president made that it clear on Tuesday, accusing Pelosi in an extraordinary, rambling six-page letter of orchestrating "an illegal, partisan attempted coup."

"You are the ones subverting America's Democracy. You are the ones Obstructing Justice. You are the ones bringing pain and suffering to our Republic for your own selfish personal, political, and partisan gain," Trump wrote. "You view democracy as your enemy!"

Some Republicans accused Democrats of havving plotted to impeach the president since he was elected. After Democrats took control of the House in January, Pelosi pushed back on lawmakers who'd been advocating for impeachment, calling it "divisive" and saying of trying to remove Trump, "He's just not worth it."

That position changed in September after a whistleblower filed a complaint with the Senate and House intelligence committees alleging that the president had used "the power of his office to solicit interference from a foreign country in the 2020 election."

On Sept. 23, Trump confirmed media reports that a call he had with the Ukrainian leader involved the Bidens and the withholding of aid, but he maintained that he had done nothing wrong.

"We want to make sure that country is honest. It's very important to talk about corruption. If you don't talk about corruption, why would you give money to a country that you think is corrupt?" Trump asked reporters.

Pelosi announced the next day that she was launching a formal impeachment inquiry. On Wednesday night, after the vote, she suggested that she was not yet ready to send the two impeachment articles to the Senate for its trial, saying she needed to know more about the Senate's rules for the trial before she would transmit the articles. Only then could the Senate begin its trial.

Hearings before the House Intelligence Committee featured testimony from current and former administration officials who said that the president had been turned against Ukraine by his "hand grenade" of a lawyer, Rudy Giuliani, and that they were never given a reason to freeze the aid to Ukraine. The money was released on Sept. 11 amid bipartisan pushback from Congress.

The president maintained that a summary of his July 25 phone conversation with Ukrainian President Volodymyr Zelenskiy showed that their talk was "perfect." Democrats said the summary showed him pressuring the head of a country reliant on U.S. aid to help him politically.

Trump is the third president to be impeached in the nation's 243-year history.

The two previous impeachments were also led by House Republicans. Andrew Johnson was impeached in 1868 in part for replacing a Cabinet member without the advice and consent of the Senate. Bill Clinton was impeached in 1998 for perjury and obstruction of justice for lying under oath about an extramarital affair.

Clinton apologized for his conduct before he was impeached, something that Trump, who was then in private business, said was a mistake. Trump told Chris Matthews in 1998 that Clinton should not have cooperated with the investigation and should never have said he was sorry.

"Go after your enemies — I mean, they're after you," Trump said at the time. "I think that Clinton probably is too nice a guy in a certain respect. I think that's one of the things that happened."

Johnson and Clinton were acquitted in the Senate, where a two-thirds vote is required for conviction and removal from office.

In the current Senate, leadership was already tangling over the next phase — Trump's impeachment trial.

Senate Majority Leader Mitch McConnell, R-Ky., said last week that he was working "in total coordination" with the White House, added: "My hope is there won't be a single Republican who votes for either of these articles of impeachment."

On Wednesday, McConnell took to the Senate floor to push back against Minority Leader Chuck Schumer's call to have witnesses testify in the case. "His decision to try to angrily negotiate through the press is unfortunate," McConnell said.

Schumer, D-N.Y., stood by his request on the floor, saying, "I have yet to hear an explanation why less evidence is better than more evidence, particularly when it comes to something as somber, as serious, as important as impeachment of the president of the United States of America."