A man who threatened to assassinate Joe Biden in Utah was shot dead by the FBI hours before the president arrived in the state.
Craig Deleeuw Robertson, who was in his early 70s, died when special agents raided his home to arrest him in Provo, south of Salt Lake City.
Mr Biden was immediately briefed on the raid while he was still in New Mexico, before he headed to Utah.
Photographs posted by Robertson on social media showed he had an arsenal including a laser-sighted sniper rifle, various semi-automatic weapons, and camouflage gear known as a “ghillie suit”.
Authorities had been investigating him since April, and the FBI was first alerted in June.
An official told ABC News the threats were “credible”.
Before the raid prosecutors had filed a complaint with a judge charging Robertson with making threats against the president, interstate threats, and threatening law enforcement officers.
Mr Biden is currently visiting the western United States and was scheduled to fly late on Wednesday from Albuquerque, New Mexico, to Salt Lake City.
In a social media post on Monday, Robertson wrote: “I hear Biden is coming to Utah. Cleaning the dust off the M24 sniper rifle. Welcom (sic), buffoon-in-chief!”
He had also made threats against Vice President Kamala Harris.
In one social media post last September he wrote: “The time is right for a presidential assassination or two. First Joe then Kamala!!!”
The complaint included pictures Robertson had posted of his guns, including one semi-automatic rifle he called a “Democrat eradicator”.
He also made threats against US Attorney General Merrick Garland and New York Attorney General Letitia James.
According to the complaint Robertson described himself as a “MAGA Trumper”.
He had a woodworking business but did not renew his licence after it expired last year, according to local records.
On social media he said he had worked for 45 years as a structural steel and welding inspector before retiring and starting the woodworking business, which specialised in “custom designs”.
The US Secret Service, which protects the president, said it was “aware of the FBI investigation involving an individual in Utah who has exhibited threats to a Secret Service protectee”.
An FBI spokesman said: “The FBI takes all shooting incidents involving our agents or task force members seriously.”
It said the shooting of Robertson was under review.
Robertson had also made threats against Manhattan District Attorney Alvin Bragg.
In one social media post detailed in the complaint Robertson said he was heading to New York to “fulfill my dream of iradicating (sic)” Mr Bragg.
The FBI raid took place at 6.15am (1.15pm BST) on Wednesday, with Mr Biden due to arrive in Utah later in the day.
Robertson was armed when FBI agents arrived at his home.
Later, a broken window could be seen next to the door of the house and the blinds inside were askew.
Mr Biden’s trip to Western states had already seen him visit the Grand Canyon on Tuesday.
In a speech there he mistakenly referred to the Grand Canyon as one of the “nine” wonders of the world.