Ernesto Castellanos Martinez.
Ernesto Castellanos Martinez. Photos via San Diego Crime Stoppers

A man who gunned down a romantic rival outside a Point Loma gym, then fled to Mexico and hid out for two years, pleaded guilty Wednesday to first-degree murder.

Ernesto Castellanos Martinez, 45, is expected to be sentenced to a 45-year-to-life prison term for killing 27-year-old Alexander Mazin on Feb. 25, 2018.

Shortly before 11 a.m. that day, patrol officers responding to reports of gunfire found Mazin mortally wounded in a rear parking lot of the 24 Hour Fitness on Midway Drive, police said. He died at the scene.

The victim’s parents told reporters their son had been going out with a woman Martinez previously had dated, and that the suspect had assaulted her several weeks prior to Mazin’s slaying.

Martinez, who also admitted to an allegation of using a gun in the killing, was arrested in Mexico in March of last year. Sentencing is set for Jan. 18.