Gybram Melendez was sentenced to 15 to 40 years in state prison in Lehigh County Court Tuesday.

On Sept. 9, as his trial was about to begin, Melendez pleaded guilty to third degree murder.

Allentown police arrested Melendez on Oct. 27, 2012 following a fatal shooting in the city.

Officials said he shot and killed Carlos Rodriguez Junior in the 700 block of Washington Street around 4:30 a.m. that Saturday.