A 36-year-old man was sentenced to 24 years and 8 months in state prison Wednesday after carjacking his girlfriend's car and later trying to kidnap a teenage girl in Compton last year, prosecutors said. 

A jury convicted Ashley Luther Price last month of one felony count each of carjacking and attempted kidnapping, the Los Angeles County district attorney's office said.

After Price was involved in an altercation with his girlfriend on Sept. 29, prosecutors say he stole her vehicle. Two days later he allegedly tried to kidnap a 14-year-old girl as she walked to school in Compton.

Price grabbed the girl and tried to drag her to the vehicle, prosecutors said. But a Good Samaritan -- described as a woman driving a new Dodge Charger -- "pulled the suspect off" the girl and helped her escape, Los Angeles County sheriff's officials said.

Price then allegedly approached a 15-year-old girl about two miles away, but she managed to get away.

Authorities were alerted and found Price near the stolen car on Oct. 4. He was arrested and remained in custody until his trial and sentencing.

For breaking news in California, follow @AliciaDotBanks