MEMPHIS, Tenn. — A judge sentenced a Tennessee man to 25 years in federal prison Friday on charges connected to the fatal shooting of a police officer in 2015.

U.S. District Judge Sheryl Lipman sentenced Tremaine Wilbourn, 31, during a hearing in Memphis federal court.

Authorities said Wilbourn shot and killed Memphis Police Officer Sean Bolton while Bolton tried to detain him in August 2015. Bolton, who was white, is one of four police officers to be fatally shot in Memphis since July 2011. Wilbourn is black.

Prosecutors said Wilbourn used a gun while committing a carjacking as he tried to escape after the shooting. He pleaded guilty in April to carjacking, possessing a firearm during and in relation to the carjacking and felony possession of ammunition.

Wilbourn, of Memphis, pleaded guilty to the three charges under a deal with prosecutors that allowed him to avoid a federal trial. If the case had gone to trial, prosecutors planned to present witnesses who allegedly saw Wilbourn kill Bolton with a pistol and recover spent shell casings at the shooting scene, court documents showed.

Wilbourn still faces a first-degree murder charge in state court. State prosecutors said they will seek the death penalty if he is convicted. No trial date has been set.

Police said the 33-year-old Bolton, who had served in Iraq, interrupted a drug deal taking place inside a car in a residential neighborhood in Memphis. Wilbourn — who was a passenger in the car — exited the vehicle, and he and Bolton got into a physical struggle. Wilbourn took out a gun and shot Bolton, police said. An autopsy report shows Bolton was shot eight times.

In court documents, prosecutors said Wilbourn carjacked a vehicle from Desric Ivory a few minutes after the shooting, telling Ivory that “he needed the car because he had just shot a police officer.”

Wilbourn led officers on an intense, two-day manhunt before turning himself in to U.S. marshals. At the time of the shooting, Wilbourn was on probation after serving prison time for armed bank robbery. The judge sentenced him to more than two years in prison for the probation violation.

Wilbourn declined to comment during the sentencing hearing. During his plea hearing in April, Wilbourn acknowledged carjacking Ivory and using a weapon while doing it. But he did not say he killed Bolton.

His lawyer, Andre Mathis, said Friday that Wilbourn wished things would have gone differently.

“It’s something that he thinks about all the time,” Mathis said.

Lipman said the death of anyone, including a police officer, is a serious matter that “can’t be overstated.” Bolton’s family declined comment after the hearing.