The 911 caller asked police to check on a 15-year-old boy standing outside of Torrey Pines High School.
The boy was wearing a gray shirt and black pants, had a medium build and was not armed, the caller said.
It was about 3:30 a.m. Saturday morning — an unusual time for someone to be at the school, located in a wealthy San Diego community a few miles from the scenic Pacific coastline and world-famous Torrey Pines Golf Course.
About a minute later, two San Diego police officers arrived at the school and spotted the boy.
As soon as they got out of their cars, the boy pulled what looked like a handgun from his waistband and pointed it at one of the officers, according to a San Diego Police Department statement.
He ignored commands to drop the weapon and walked toward the officer, the news release said. The two officers again shouted at him to drop the weapon.
When he did not, they opened fire. He was shot multiple times and later died at a hospital.
The 911 caller, police later discovered, was the boy himself. The gun was a BB gun.
The boy was a student at the high school and lived in the neighborhood, police said. He was not identified because he is a juvenile.
Lt. Mike Holden, who is supervising the homicide investigation, said it is too early to label the boy's death a "suicide by cop."
But the shooting unfolded in a similar fashion as other incidents where a person wishing to end his or her own life lures police officers into doing the job.
In Los Angeles last October, 16-year-old Daniel Enrique Perez called 911 to report a man with a gun matching his own description.
After he pointed a realistic-looking replica weapon at Los Angeles police officers, one of the officers fatally shot him.
The teenager left his family a "farewell note," leading investigators to believe that he had a "desire to end his own life," Los Angeles Police Chief Charlie Beck said at the time.
Experts on police use of force say that officers have little choice if someone is pointing a gun at them and refusing to follow commands.
Increasingly, police officers are being trained in how to deal with mentally ill people and how to de-escalate conflicts by taking a step back and talking to suspects before using physical force on them.
But those techniques are of little use if someone is already pointing what looks like a gun.
With only split seconds to react, police officers cannot distinguish between replica guns and real guns and must shoot to protect themselves or bystanders, the experts said.
"If you're just talking with someone, sure, de-escalation and talking becomes relevant. Once somebody pulls a gun, that's the threat, that's what you've got to deal with," said University of South Carolina criminologist Geoffrey Alpert. "You're not going to wait to see if it's real and pull the trigger. You've got to protect yourself."
Police officers do defuse many situations before they are forced to shoot, said Greg Meyer, a use of force expert and retired LAPD captain.
But a person with a death wish sometimes orchestrates the situation to give an officer only one way out.
"It's a basic part of suicide by cop. When someone is intent on doing that, they put themselves in a position where they're armed or appear to be arming themselves, in a way that really gives no choice," Meyer said.
That appeared to be the case at Torrey Pines High School, said Ed Obayashi, a use of force expert who is both a deputy sheriff and a deputy district attorney in Plumas County, Calif.
"This is a justifiable homicide. As tragic as it is, this is as justifiable a shooting as there is," Obayashi said. "It's horrible, but what else would a reasonable officer have done?"
This type of shooting is especially hard on the police officers who pulled the trigger, the experts said — especially when the victim is a teenager.
"Any killing or shooting is terrible and takes a toll on officers," Obayashi said. "But killing an individual who is just suffering from personal demons and really wanted the police to end it for him is very different emotionally, guilt-wise, as opposed to shooting a robber who has just killed someone and wants to shoot it out with police."
The two officers who fired at the Torrey Pines boy have not been identified, but the department is expected to release their names in the next few days. Police officials said one has been with the department for four years and the other for 28 years. One serves on the Juvenile Services Team, which coordinates school safety, substance abuse and other youth programs.
Holden said the boy was white, but he declined to name the race of either officer.
Both officers were wearing body cameras, and the district attorney's office can decide whether to release portions of the video after its investigation is complete, Holden said.
Detectives are speaking with the boy's family to figure out what might have motivated him, Holden said.
At Torrey Pines High School, mourners left flowers at a small memorial to the 15-year-old boy.
"Please, provide the resources to give mentally ill humans the dignity for a productive, healthy, & loving life," said a handwritten note left at the memorial.
Eric Dill, superintendent of the San Dieguito Union High School District, said in a letter to families that crisis counselors will be at the school Monday.
"Please rest assured that we will do everything possible to maintain our daily routine while supporting each other as we deal with this sad event," Dill wrote.
Saturday was supposed to be a quiet day on campus, other than students taking an SAT test. Instead, police investigators combed the school's parking lot for evidence.
"Obviously, our staff is devastated to hear this kind of news," said the school's principal, Rob Coppo. "We never want to have to deal with this in our careers."
Amanda Chen, editor in chief of the school newspaper, said she did not know the student who was killed by police officers.
But she said the school's "very competitive" and "cliquey" atmosphere can lead to feelings of stress and alienation.
"Because it's such an affluent, highly-educated area, there are high expectations for students to succeed," said Chen, 17.
After the dispatcher asked officers to check on the boy at the school, the police radio went silent for about seven minutes, according to a scanner recording posted on the website Broadcastify.
Then the dispatcher acknowledged that there had been shots fired and asked if any officers were injured.
"Negative," an officer said before requesting paramedics. He and another officer were performing CPR, he said.
They continued to try to save the boy's life for several more minutes.
San Diego Union-Tribune staff writers Kristina Davis and Dana Littlefield contributed to this report.