BUFFALO, N.Y. (WIVB) — A Buffalo man was sentenced to 40 years to life in prison as a second felony offender for a March 2021 murder, the Erie County District Attorney’s Office announced Thursday.

Cortez Foster, 33, was found guilty by a jury in February of one count of second-degree murder and one count of second-degree criminal possession of a weapon.

Officials say just after 4:30 a.m. on March 14, 2021, Foster approached the victim, 29-year-old Marcus Spain, who was sitting inside of a parked vehicle on the 200 block of Johnson Street in Buffalo. Foster then intentionally fired multiple shots at the victim with an illegal gun.

Spain was taken by ambulance to ECMC where he later died from his injuries.

In addition, Foster also pleaded guilty Thursday to one count of third-degree criminal possession of a controlled substance and one count of resisting arrest in a separate criminal case.

Officials say at approximately 6:34 p.m. on Jan. 7, 2020, Buffalo police initiated a traffic stop on William Street after seeing Foster fail to stop his vehicle at a stop sign. Officers smelled the odor of marijuana and saw a small amount of loose marijuana in the backseat of the vehicle, which prompted a search.

Officers found a bag containing over a half ounce of fentanyl in the glove box and, when trying to place Foster under arrest, he attempted to escape, refused orders and fought with police before being taken into custody.

Foster faces a maximum of 15 years in prison when he is sentenced May 12 for the traffic stop-related charges.

Adam Gorski is a Buffalo native who joined the News 4 team in 2022. You can find more of his work here.