A Deputy US Marshal shot a would-be carjacker while he was guarding Supreme Court Justice Sonia Sotomayor’s home in Washington DC, authorities said.
The man was shot after approaching the car the officer was sitting in and tapping the window with a gun.
The deputy fired several times, hitting the suspect in the mouth. A second deputy also opened fire, but did not hit the man, police said.
Justice Sotomayor’s home is not believed to have been a deliberately targeted.
The suspected carjacker, named in charging documents as Kentrell Flowers, 18, is being treated in hospital and faces carjacking and firearms charges. The two deputies have not been identified.
Court documents said Mr Flowers had emerged from a silver minivan - which had been stolen earlier in the evening - and approached the officers' car.
Court documents said the two officers were wearing US Marshals branded polo shirts and T-shirts during the incident.
The teenage suspect was charged with armed carjacking, carrying a pistol without a licence, and possession of a large capacity magazine. Magazines with over 10-round capacity are illegal in Washington DC.
An investigation into the alleged attempted carjacking is underway, but police said there was no indication the suspect knew who he had approached, or that he was near Justice Sotomayor's home.
The driver of the minivan fled the scene, with the minivan found abandoned later.
Vehicle thefts and carjackings were a serious issue in the US capital, but there has been a 43% decrease in such incidents this year, Metro police figures show.
In 2023, a US Secret Service agent shot at two teenagers - aged 14 and 19 - who broke into a car assigned to protect Naomi Biden, the granddaughter of US President Joe Biden.
And Rep Henry Cuellar - a Democrat from Texas - was carjacked last year in the Navy Yard area of the city.
Ms Biden, 30, was not with the agents when the attempted robbery took place on the night of 12 November, in Washington’s wealthy Georgetown area.