A US Marine Corps veteran with suspected mental health issues killed 12 people in a busy bar in California, including a policeman, officials say.
The shooting began at 23:20 local time on Wednesday about 40 miles (65km) north-west of Los Angeles, police say.
At least 200 people were reportedly inside the Borderline Bar and Grill, which was hosting a university student night, at the time of the attack.
Police have named the suspect as 28-year-old Ian David Long, who had suspected mental health issues.
Earlier this year, police mental health professionals interviewed and cleared him after sheriffs' deputies found him behaving "irate" and "erratically" at his home, said authorities.
How did the shooting occur?
Police say the suspect was dressed in black, and forced his way into the bar after shooting the bouncer.
A college country music night was under way when the suspect apparently threw a smoke grenade before opening fire, witnesses say.
Police say he used a legally owned .45 calibre Glock semi-automatic handgun, which had an extended magazine that is illegal in the state of California.
The extended magazine allowed the gun to carry more than its typical 11-bullet capacity.
Police say they do not yet know how many shots were fired, or whether the gunman ever reloaded during the attack.
One witness, Teylor Whittler, who was celebrating her 21st birthday said: "I was on the dance floor and I heard the gunshots, so I looked back and then all of a sudden everyone screamed: Get Down!
"It was a huge panic, everyone got up, I was trampled, I was kind of left on the floor until some guy came behind me and grabbed me and dragged me out."
People escaped the bar by using chairs to break windows, while others reportedly sheltered inside the venue's toilets.
At least 10 people are known to have been wounded and others are self-reporting with injuries at local hospitals.
Popular among students, the bar is close to California Lutheran University, Pepperdine University and Moorpark College.
What have police said?
Ventura County Sheriff Geoff Dean described the scene inside the bar as "horrific" and said there was "blood everywhere".
He said first responders arrived less than three minutes after the first emergency calls from the venue were made.
Ventura Sheriff's Sergeant Ron Helus, who later died in hospital, had tried to enter the active scene with a local highway patrolman when he was shot several times.
The husband and father-of-one had been a policeman for 29 years and was a professional firearms instructor.
He was due to retire next year.
"It saddens us all and tears at our emotions. He died a hero. He went in to save lives, to save other people," the sheriff said.
Who is the suspect?
Police say they have had several minor contacts with Long in recent years, including in April 2018 when they were called to his house after a report of a disturbance.
During talks with police, he appeared "somewhat irate, acting a little irrationally", the sheriff said.
A police crisis intervention team interviewed him, and determined that it was not necessary to hold him against his will in a mental health facility under a so-called 5150 order.
The order allows authorities to involuntarily detain a person for up to 72 hours if it is believed that they pose a threat to themselves or others.
Mental health professionals believed that he suffered from PTSD (post-traumatic stress disorder), the sheriff said.
In a statement, the US Marine Corp confirmed that he had served from 2008 to 2013 as a machine gunner and rose to the rank of corporal.
He served in Afghanistan from November 2010 to June 2011 and received several medals for his military service, including the Marine Corps Good Conduct Medal, the Afghanistan Campaign Medal, and the Global War on Terrorism Service Medal.
Police have just begun to search his home, and expect to know more about him and his possible motive soon.
Who are the other victims?
It is not yet clear who the other 11 victims inside the bar are, but the Wednesday night country music event is popular with local university students.
According to the bar's website, Wednesday nights are college-themed and are open to students as young as 18.
The bar is located close to California Lutheran University, Pepperdine University and Moorpark College and is popular among students.
Footage on local media of the aftermath shows injured young people being carried away from the scene by friends.
Police say at least 10 people are known to have been injured and others are self-reporting with injuries at local hospitals.
The latest in a long line
The US has suffered from mass shootings for decades, but most of the deadliest have occurred in recent years.
In the last two weeks alone, a man shot dead two people yoga studio in Florida, and another gunman opened fire on a synagogue in Pittsburgh, killing 11.
The deadliest attack in modern US history came last year in Las Vegas when a 62-year-old man opened fire on a crowd of 22,000 country music concertgoers from the 32nd floor of a nearby hotel, killing 58 and wounding hundreds.
One man who survived the attack on the Borderline Bar told CBS that several attendees on Wednesday night had also been present for the Las Vegas attack on the Route 91 Harvest Festival.
"It's the second time in about a year and a month that this has happened," Nicholas Champion said.
"It's a big thing for us. We're all a big family and unfortunately this family got hit twice."
The previous most deadly attack was another just a year earlier, when 49 people were killed in Pulse - a gay nightclub - in June 2016. in Orlando.
Some students from Marjory Stoneman Douglas High School in Parkland, Florida - where 17 were killed in February - have taken up a public campaign for gun law reform in recent months but little in the way of change has emerged from legislators.
According to the website Gun Violence Archive, more than 12,000 people have been killed using firearms in the US so far this year, including about 3,000 people under 18.
That number does not include an annual estimate of 22,000 suicides via firearm.
What has reaction been?
President Trump tweeted on Thursday morning to say he been briefed on the shooting, describing it as "terrible", and praising the bravery of the police officers involved.
Flags at the White House were lowered to half-mast to commemorate the victims.
Sheriff Dean, who on Thursday completes his last day serving as Ventura County sheriff, warned: "It doesn't matter how safe your community is, it doesn't matter how low your crime rate is - there are people who just don't think properly everywhere, I don't care where you are, and they commit horrific acts like this."
"There's no way to process. There's no way to make sense out of the senseless."