Donald Trump has surrendered in Georgia on charges of plotting to overturn the state's 2020 election results in an arrest that saw the first ever mugshot of a former US president.
Mr Trump had to pay a bail bond of $200,000 (£160,000) to be released from the Atlanta jail while he awaits trial.
Afterwards, he described the case as "a travesty of justice".
It was his fourth arrest in five months in a criminal case, but this was his first police booking photo.
Mr Trump later posted on X, formerly known as Twitter, for the first time since January 2021. He shared the address of his website and the mugshot with an all-capital letters caption: "Election interference. Never surrender!"
He joins the ranks of American public figures who have had arrest booking photos, including Frank Sinatra, Al Capone and Dr Martin Luther King Jr.
Mr Trump argues the cases against him are politically motivated because he is leading the Republican race to challenge President Joe Biden, a Democrat, in next year's presidential election.
The first former or serving US president ever to be indicted, he made the round trip from New Jersey on his private jet on Thursday afternoon.
Mr Trump was whisked to Fulton County Jail by a more substantial motorcade than he has used for previous court appearances this year.
He was inside the facility for around 20 minutes. Dozens of his supporters gathered outside.
Records posted on the jail's website described Mr Trump as a white male, 6ft 3in, and weighing 215lbs (97kg), with blond or strawberry hair and blue eyes. His inmate number was P01135809.
Before heading home he told reporters at the airport that he was entitled to challenge the result of a vote.
"I thought the election was a rigged election, a stolen election," said Mr Trump, who often makes unfounded claims of widespread ballot fraud in 2020. "And I should have every right to do that.
Mr Trump was charged last week alongside 18 co-defendants with meddling in Georgia's election results following his loss to Mr Biden by fewer than 12,000 votes in that state.
The former president was heard in a phone call pressuring Georgia's top election official to "find 11,780 votes" during the ballot count.
Among the 13 charges Mr Trump faces are racketeering, soliciting a public official to violate his oath of office, conspiracy to impersonate a public officer, conspiracy to commit forgery and making false statements.
He denies all the counts against him.
Half of his co-accused have already been booked at Fulton County Jail in recent days ahead of Friday's deadline. They include former New York Mayor Rudy Giuliani and former White House Chief of Staff Mark Meadows.
One of Mr Trump's co-defendants, the leader of Black Voices for Trump, Harrison Floyd, is being held in custody after turning himself in on Thursday without a bail agreement, court officials say.
A Georgia judge granted a speedy trial request to another co-defendant, attorney Kenneth Chesebro. His case is now due to begin on 23 October.
Just hours before turning himself in, Mr Trump replaced his leading defence lawyer, Drew Findling, with veteran Atlanta criminal defence attorney Steven Sadow.
One of the conditions of Mr Trump's bail release is that he refrain from any comments, on social media or otherwise, that are intended to "intimidate" witnesses or co-defendants. He is also not allowed to have any communication with the other co-defendants, except through his lawyers.
Before arriving in Georgia, Mr Trump continued to criticise the prosecutor bringing the charges, Fulton County District Attorney Fani Willis, a Democrat, who he accuses of trying to sabotage his White House campaign.
Posting on his Truth Social platform, he blamed Ms Willis for murder and violent crime in Atlanta, writing that "people are afraid to go outside to buy a loaf of bread".
The latest police figures indicate that homicides in Atlanta have decreased by about a quarter since last year. Murders in the city spiked during the pandemic, as they did in most major US cities, but they are far from the levels seen in the 1990s.