Three police officers were shot dead and two wounded on Wednesday in southern Pennsylvania in the United States before the attacker was shot down, authorities said.
It was one of the deadliest days for police, not only in Pennsylvania, but in the US, in recent times.
Here is what we know:
What happened in Pennsylvania?
The shooting happened a little after 2pm (18:00 GMT) on Wednesday at a farmhouse along a quiet country road, a few miles outside an old mill town.
Five police detectives and a deputy sheriff had gone there to arrest a man on suspicion of stalking, prowling and trespassing, District Attorney Tim Barker said.
According to Barker, the suspect, Matthew Ruth, opened fire on the officers with an AR-15-style rifle. The four detectives closest to him were hit, and two managed to stagger into cover as they returned fire.
The gunman then turned on the fifth detective and the deputy as they joined the gunfight. The exchange ended with three detectives and the suspect dead, authorities said. The fourth detective and the deputy were critically wounded.
The emergency response unfolded on the rural road. Officers held people back from the area as about 30 police vehicles blocked off nearby streets.
Where did the shooting take place?
The shooting took place on Haar Road in North Codorus Township, a farming community in York County.
It is about 185km (115 miles) west of Philadelphia, not far from the Maryland border, authorities said.
The shooting also prompted a temporary shelter-in-place order for a school district in Spring Grove, Pennsylvania, a town of roughly 2,500 residents. Officials later clarified that no schools were affected.
What do we know about the suspect?
The gunman was identified as 24-year-old Matthew Ruth. Barker said the farmhouse belonged to Ruth’s ex-girlfriend and her mother.
The night before the incident, the two women told officers that Ruth had been hiding outside their home in camouflage and looking through the windows with binoculars.
The ex-girlfriend also suspected him of torching her pick-up truck last month.
Police obtained an arrest warrant after failing to find him during an overnight search. When detectives and a deputy sheriff returned to the farmhouse the next afternoon, they came under immediate fire.

What do we know about the victims?
Authorities have not provided many details about the victims.
Two surviving officers were transported to WellSpan York Hospital in York, Pennsylvania, and were currently in critical but stable condition, Paris said.
Images from the scene showed an officer being airlifted by a medical helicopter.
“This is an absolutely tragic and devastating day for York County and the entire commonwealth of Pennsylvania,” Pennsylvania Governor Josh Shapiro said during a news briefing.
“We grieve the loss of life of three precious souls who served this county, who served this commonwealth, who served this country.
“This kind of violence is not OK. We need to do better as a society,” Shapiro said.

What is the broader picture of violence against officers in the area?
This marked one of the darkest days for Pennsylvania law enforcement in recent years. Back in 2009, three Pittsburgh officers were shot dead in an ambush while responding to a domestic disturbance by a man wearing a bulletproof vest.
More recently, in February, another officer in the state was killed after a man armed with a pistol and zip ties stormed a hospital’s intensive care unit, taking staff hostage before a shootout left both the suspect and the officer dead.
Nationally, the killings are also among the deadliest single incidents for police officers since the September 11, 2001 attacks. In April this year, four officers were killed in Charlotte, North Carolina; three were killed in Baton Rouge, Louisiana; five in Dallas, Texas, in separate incidents in July 2016; four were killed in Lakewood, Washington, in November 2009; and four in Oakland, California, in March 2009.
Shapiro ordered all US and Pennsylvania flags on public buildings across the state to be lowered to half-staff in memory of the officers killed in the Wednesday attacks.