A Metropolitan Police officer died after he was shot inside a police station by a man who then turned the gun on himself.
The victim died in hospital after the gunman, who was being detained, opened fire at Croydon custody centre in south London during the early hours of Friday.
The 23-year-old murder suspect is in a critical condition in hospital with a self-inflicted gunshot wound after he was held at the scene.
Scotland Yard said no police firearms were fired during the incident at around 2.15am.
Met Commissioner Cressida Dick said: "This is a truly shocking incident in which one of our colleagues has lost his life in the most tragic circumstances.
"My heart goes out to his family, direct colleagues and friends.
"We are currently supporting his family and also have a dedicated team providing support to the officers and those in the custody centre who witnessed the shooting.
"When a colleague dies in the line of duty the shockwaves and sadness reverberates throughout the Met and our communities.
"Policing is a family, within London and nationally, and we will all deeply mourn our colleague.
"We are in the early stages of the investigation and are still working to establish the circumstances surrounding the incident and we will provide further updates when we have them."
The officer joins a long list of colleagues killed in the line of duty, with the National Police Memorial roll of honour in London listing all the officers who have been killed by criminal acts in the line of duty since 1680.
The roll records more than 1,600 officers who have died while performing vital tasks such as foiling terrorists, quelling rioters and marshalling protests.
Among them was Pc Andrew Harper, who died when he was caught in a tow rope and dragged along country lanes after trying to stop quad bike thieves in Berkshire in August 2019.
His three teenage killers were cleared of murder but convicted of manslaughter after an Old Bailey trial.
Prime Minister Boris Johnson was among those who reacted to the news on Friday morning, tweeting: "My deepest condolences go to the family, friends and colleagues of the police officer who was killed in Croydon last night.
"We owe a huge debt to those who risk their own lives to keep us safe."
Home Secretary Priti Patel said: "I am deeply shocked and saddened to learn that a Metropolitan Police Officer has been shot and killed in the line of duty.
"My thoughts today are with his family, friends and policing colleagues in London and across the country.
"This morning I spoke to Metropolitan Police Commissioner Cressida Dick to express my condolences and to offer whatever support is needed as this tragic event is investigated.
"This is a sad day for our country and another terrible reminder of how our police officers put themselves in danger each and every day to keep the rest of us safe."
Mayor of London Sadiq Khan said: "I am devastated by the news a Metropolitan Police officer has lost his life.
"I was informed of this tragic incident by the Commissioner this morning, and my heart goes out to the family of this brave officer, who has paid the ultimate price for helping to keep Londoners safe."
The incident has been referred to Independent Office for Police Conduct watchdog which will lead an independent investigation.
The Met continues to investigate the officer's murder.
The officer's family are being told.