A California man is facing a charge of attempted murder after his arrest near the home of Supreme Court Justice Brett Kavanaugh.
Nicholas John Roske, 26, had planned to murder a Supreme Court justice and was armed with a pistol and tactical knife, court documents said.
The suspect was taken into custody at about 01:00 local time (06:00 BST).
Protection for the justices has been beefed up ahead of a landmark ruling on US abortion rights.
According to an affidavit filed in US District Court, Roske was spotted by two US Deputy Marshals while getting out of a taxi in front of a Supreme Court justice's home.
Carrying a suitcase and a backpack, Roske turned to walk down the street.
Soon after, local emergency services took a call from a man who identified himself as Roske.
Roske said he was having suicidal thoughts, had a gun and had come from California to "kill a specific United States Supreme Court justice". Local police officers were sent to the justice's home and arrested Roske.
According to the Washington Post, Justice Kavanaugh and his family were at home at the time of the arrest.
While in custody, Roske said he was "upset" about the leaked Supreme Court document on abortion, as well as the recent mass shooting in Uvalde, Texas, according to the affidavit.
He said he believed Justice Kavanaugh might issue rulings that would loosen gun control regulations.
Roske was found to have a Glock 17 pistol, pepper spray, zip ties, a hammer, screwdriver, crowbar and duct tape.
He was asked a series of question by a judge during a brief court appearance on Wednesday afternoon, including whether he was thinking clearly when he was arrested.
"I think I have a reasonable understanding, but I wouldn't say I'm thinking clearly," he responded, confirming that he was a college graduate and had been taking an unspecified medication.
He is expected back in court on 22 June.
If convicted, he faces a maximum sentence of 20 years in federal prison for attempted murder of a United States judge, though actual sentences for federal crimes are usually less than the maximum penalties.
A White House spokeswoman said President Biden "condemns" the action of the individual who threatened the justice.
In May, a leaked draft decision from the top court in the US suggested it would overturn Roe v Wade - the landmark 1973 case that guaranteed abortion access across the US.
The draft ruling spurred protests nationwide, including some peaceful demonstrations outside the homes of some of the nine justices on the court.
Last month, a group of about 100 people marched from the home of Justice Kavanaugh to Chief Justice John Roberts' home nearby. Both justices are conservative and seen as potentially supportive of curtailing abortion rights.
The protests led Washington lawmakers to introduce legislation to Congress that would increase protections for Supreme Court justices. The legislation has passed the Senate, but has not yet been taken up by the House of Representatives.
One Democratic senator involved in negotiations on the proposed bill said that the remaining sticking points are over the scope of who will be protected. Democrats say that other employees of the top court, who are not judges, also deserve enhanced security, Senator Chris Coons told CNN on Wednesday.
In the aftermath of the draft ruling leak last month, the US Marshals Service has been providing "around-the-clock security" outside the homes of all nine justices, according to the Department of Justice.
Senate Republicans blamed Wednesday's attempted attack on Democratic rhetoric.
They pointed to remarks by Senator Chuck Schumer in March 2020 in which he warned Justice Kavanaugh and another Trump-nominated conservative justice "you will pay the price" and "you won't know what hit you" if they voted to undo abortion protections.
Mr Schumer apologised the next day and denied he was threatening the judges.