President Donald Trump has become the first president in history to be impeached twice by the US House of Representatives – and remains one of just three to have been impeached at all.

Here's what happened to the others.

Andrew Johnson

What did he do?

In the shadow of the Civil War, President Andrew Johnson – a Democrat – sparred constantly with the Republican-held Congress over how to rebuild the defeated US South.

The "Radical Republicans" of this period pushed for legislation to punish former Confederate leaders and protect the rights of freed slaves. Johnson used his presidential veto to block the Republican efforts at every turn.

In March, Congress passed the Tenure of Office Act, crafted to curtail the president's ability to fire members of his cabinet without approval from the Senate. In defiance, Johnson suspended a cabinet member and political rival, Edwin Stanton, while Congress was in recess.

If today's proceedings seem like a lot of political theatrics, it is in keeping with impeachment tradition: Stanton responded to his firing by locking himself in his office and refusing to leave.

Stanton's removal proved to be the final straw – the House Republicans rushed to draft 11 articles of impeachment.

After a vote along party lines the articles were presented to the Senate, where he was acquitted, but only just. It was a single vote short of the two-thirds majority needed to convict.

What were the consequences?

According to some accounts, Johnson wept at the news of his acquittal, vowing to devote himself to restoring his reputation.

It didn't work.

He served out the rest of his presidential term, but his final months in office were beset with the same power struggles that warped his tenure prior to impeachment.

And in 1869, Democrats lost the White House to Republican candidate General Ulysses S Grant, who allowed his party's plan for Radical Reconstruction to continue.

  • What this means for Trump, Biden and America

  • Did Trump's words at rally incite the riot?

What is his legacy?

Being impeached.

And buying Alaska in 1867 for a cool $7.2m.

Johnson was also one of the poorest presidents. He never went to school.

Richard Nixon

What did he do?

The near-impeachment of Richard Nixon traces back to the 1972 break-in of the Democratic party's headquarters at the Watergate office complex in Washington DC.

As investigations revealed that the burglars had been paid with funds from Nixon's re-election campaign, the Watergate scandal spread far beyond the break-in, implicating top White House officials.

For nearly two years, Nixon scrambled to cover up his role in the conspiracy, leading to his eventual demise.

The Republican president's efforts proved futile. In August 1974, as the House Judiciary Committee prepared impeachment articles, Nixon was forced to release Oval Office recordings in which the president is heard ordering his staff to have the CIA tell the FBI to stop its investigation into the Watergate break-in.

This now-infamous "smoking gun" tape marked the final breakdown of Nixon's attempted cover-up.

  • Nixon's secret testimony released

  • Tapes reveal Nixon amid Watergate

On 27 July, the House Judiciary Committee voted to pass three articles of impeachment – obstruction of justice, misuse of power and contempt of Congress – and sent them to the House for a full vote.

But, the vote never occurred.

On 8 August, 1974, Nixon resigned. He remains the only US president in history to have done so.

"I have never been a quitter," he said in his resignation speech. "To leave office before my term is completed is abhorrent to every instinct in my body. But as president, I must put the interest of America first."

What were the consequences?

Vice-President Gerald Ford was sworn in as president six weeks later, and pardoned Nixon for any crimes he had committed while in office.

Up for election less than two years later, Ford lost the White House to Democrat Jimmy Carter.

  • What does it take to impeach a president?

What's his legacy?

No contest. It's the Watergate scandal. Though he never admitted to any criminal wrongdoing, his actions remain a cautionary tale of abuse of presidential power.

Nixon died in April 1994, 20 years after he resigned in disgrace.

Speaking at his funeral, then-President Bill Clinton focused on Nixon's work in foreign affairs.

"Let us say: may the day of judging President Nixon on anything less than his entire life and career come to a close," Mr Clinton said.

Bill Clinton

What did he do?

Just a few years after President Bill Clinton preached forgiveness for Nixon's failings, the Arkansas Democrat was facing his own political crisis.

Within one year of taking office, Mr Clinton found himself under investigation by a Justice Department special prosecutor.

Under special counsel Kenneth Starr, the scope of the probe into real estate dealings expanded in January 1998 to include the president's affair with former White House intern Monica Lewinsky.

  • The link between Monica Lewinsky and Donald Trump

  • Clinton: 'I acted right' over Lewinsky

As part of a separate lawsuit against the president – the sexual harassment of Paula Jones – Mr Clinton was asked about his relationship to Ms Lewinsky. Under oath on 17 January, Mr Clinton denied having a relationship with the former White House aide.

Days later, Mr Clinton famously doubled down on his denial.

"I want you to listen to me," President Clinton said to media at a White House appearance. "I did not have sex with that woman, Monica Lewinsky. I never told a single person to lie, not a single time, never."

On 9 September 1998, Mr Starr released his report to Congress. The public, too, soon got to see the 445-page Starr report which included salacious testimony from Ms Lewinsky, who had struck an immunity deal with the independent counsel in exchange for her co-operation.

The report also included 11 possible grounds for impeachment. In December 1998, the House of Representatives voted along party lines to impeach Mr Clinton on two counts: perjury and obstruction of Congress.

In February, Mr Clinton was acquitted by the Republican-controlled Senate.

What were the consequences?

For the year that the Lewinsky-Clinton scandal consumed the country, the president resisted growing calls to resign.

It was during this period, at the end of January 1998, that Mr Clinton laid claim to one of his highest-ever opinion poll ratings. In a poll for CNN, Gallup found that 67% of Americans approved of the president.

In the end, the only politicians to lose their jobs during the impeachment crisis were Republicans.

The Republican plan to ride the scandal to victory in the 1998 midterms backfired: Democrats made gains in both the House and the Senate.

Mr Clinton left office in January 2001 with a 65% approval rating – the highest of any of his predecessors in half a century.

But his party lost the White House when George W Bush beat Al Gore after a recount in Florida.

What is his legacy?

Depends who you ask but the Monica Lewinsky scandal would be up there for most people as the first thing they think of. The impeachment that followed? Less so.

His high popularity ratings throughout the process suggest he was not as damaged by it as the previous two presidents who faced it.