Follow CBSPHILLY Facebook  | Twitter

TOMS RIVER, N.J. (CBS/AP) — A South Jersey man was sentenced to 30 years in prison Friday, without the possibility of parole for killing a romantic rival, according to Ocean County prosecutors. Alan McGinnis, 27, pleaded guilty to first-degree murder in December in the death of 20-year-old Cody MacPherson.

Prosecutors say both men had been in relationships with the same woman.

Authorities said McGinnis stabbed MacPherson in September 2017 in Pemberton Township, put the body in the trunk of a vehicle and dumped it in a wooded area in Colliers Mills Wildlife Management Area in Jackson, where they were found in March by the state forest fire service during a controlled burn in the area.

Ocean County Assistant Prosecutor Michael Weatherstone said witnesses acknowledged last year having heard McGinnis “announce his intent to stab the victim” and then saw him do so. The prosecutor said MacPherson was still alive when McGinnis put his body in the trunk of his car.

Fire Crews Investigating Deadly House Fire In Montgomery County

At an April court appearance, Weatherstone said a relative who lives about a mile from where the body was found told police that McGinnis knocked on his window around 3 a.m. “He said, ‘Hey, do you have a shovel? I have a body in the trunk,’ or words to that effect,” Weatherstone said at the time.

McGinnis then went back to the Pemberton home, got its surveillance system, and burned it in the woods along with the victim’s cellphone and clothes, the prosecutor said.

(©Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)