Rory Murga, 17, is charged as an adult after he had been sought as a "person of interest" in the case. Deputies from the Pico Rivera station's summer enforcement team spotted Murga at about 7:35 a.m. under a railroad underpass near the intersection of Rosemead Boulevard and Slauson Avenue, according to a statement from the Los Angeles County Sheriff's Department's Homicide Bureau.
When authorities contacted the teenager, he identified himself and was taken into custody, the news release said.
After being booked at the station, Murga was expected to be transported to a juvenile detention facility, where he will be held without bail on a murder charge, the sheriff's department said.
Murga is suspected in the death of Elena Lillian Moore, whom sheriff's personnel found suffering from fatal stab wounds at her home in the 9800 block of Shade Lane early Friday morning.
Authorities said Moore's mother had woken up to hear her daughter screaming that she had been stabbed.
Moore then staggered into her mother's bedroom and collapsed.
Authorities say the teen was downstairs when the suspect entered the home through the back door. She was stabbed and ran upstairs to her mother's room, police said.
Moore was pronounced dead at the scene. It was unclear if the suspect was allowed into the home or if he forced his way in.
Deputies said Murga was a suspect in the crime based on statements the victim had told her mother before she collapsed.
The teen and Murga had ended their one-year relationship two weeks ago.
Neighbors and friends of the victim said it was heartbreaking to hear what happened.
"They were always pretty happy. They were always hanging out, just walking around through here. He was a nice guy, but I mean from what I've seen from him, he was always wearing very dark clothes. He was almost like a heavy-metal type," friend Jaime Lugo said.
Another friend, Melanie Estrada, said no one deserved to be killed in such a horrific way, especially by someone they loved.
Moore used her last words after being stabbed in her Los Angeles-area home to scream the name of the ex-boyfriend, helping make him a suspect in her death, according to the lieutenant in charge of the investigation.
The girl's screams woke her neighbors from sleep just after 3 a.m. in the quiet neighborhood in Pico Rivera, about 10 miles southeast of downtown Los Angeles, Lt. Eddie Hernandez said.
Moore had been stabbed at least once in the chest, and she collapsed and died after yelling the name "Rory."
"She was yelling and screaming his name. It's horrible," Hernandez said. "Can you imagine waking up to the screams of your daughter at 3:15 in the morning and this happens? It's unthinkable."
Evidence found at the crime scene also tied Rory to the home, Hernandez said.
Two photographs of Murga were released after investigators searched for him for 12 hours. One showed him with short green hair, and the other one pictured him with longer black hair with a section of bangs dyed light brown.
A kitchen knife believed to be the weapon used in the attack was recovered inside the home, Hernandez said.
It was unclear whether Elena let her killer into the home or whether the attacker broke in, he said, adding that damage found to the back door could have happened in the past.
Elena and Rory dated for a year until she ended the relationship, he said.
The home was encircled Friday afternoon with crime-scene tape, and sheriff's investigators were seen taking bloodhounds inside. The middle-class block of homes is just down the street from a church and several schools.
Jasmine Gonzalez, 20, who lives nearby, said she often saw Elena and her boyfriend walking together in the neighborhood.
"It was always just them two," she said, adding that her grandfather woke to the girl's screams, as well. "It's a shock to everybody."
Another neighbor, 60-year-old David Arias, saw the couple hanging out in front of his house from time to time.
"They seemed happy and lovey dovey," he said. "Always hugging and kissing."
The Associated Press contributed to this report.