A third mistrial was declared Tuesday in the case of a man accused of shooting a Baltimore police officer in 2014. Gregg Thomas, 36, was charged with attempted first-degree murder and other crimes in the shooting of Sgt. Keith Mcneill in March 2014. Mcneill was shot outside an automotive shop in the Berea neighborhood of East Baltimore.

Jurors could not reach a unanimous verdict.

The prosecution said witness testimony and closed-circuit television footage linked Thomas to the crime. The defense argued that the state’s case relied on a single witness whose testimony was not credible.

It was the third effort to convict Thomas. The first trial, in September 2015, ended in a mistrial because police did not deliver certain pieces of evidence to the defense, Judge John Addison Howard ruled.

Thomas was tried again in February, but the jury could not reach a unanimous verdict.

Rochelle Ritchie, a spokeswoman for the Baltimore state’s attorney’s office, expressed disappointment with the outcome. “Justice has yet to prevail for Baltimore Police Sgt. Keith Mcneill,” she said in a statement. “Today’s decision will not stop us in our relentless pursuit of justice.”

Ritchie did not say whether the office plans to retry Thomas.

Thomas’ attorney, Jason Ott, declined to comment after the trial. The Baltimore police union did not respond to a request for comment.

On the night of the shooting, Mcneill was having his truck worked on at a Belair Road automotive shop owned by his friend Bruce Higgs, Assistant State’s Attorney Traci Robinson said. Mcneill went to an ATM, then returned to the shop to pay Higgs and to discuss a problem with his new brake pads, she said.

Mcneill saw a masked man banging on the door, asked what he wanted and identified himself as a police officer, Robinson said. The man responded by firing eight shots at Mcneill in his truck, Robinson said.

“It was relentless,” the prosecutor said in her closing statement Friday. Mcneill “didn’t believe it was ever going to stop.”

A witness saw the shooter get into a blue Lincoln Town Car with Maryland agriculture tags, Robinson said.

Shortly after, Gregg Thomas drove up to Lee Allmond in a blue Lincoln Town Car with Maryland agriculture tags at Madison Street and Linwood Avenue, Robinson said. The two men were friends, Allmond testified last week, and Thomas offered to lend him the car.

Allmond accepted, not knowing that police were scouring the city in search of that make and model, he said.

“The next thing I know I was handcuffed,” Allmond testified.

But Allmond had an alibi: a lottery ticket purchased at 6:58 p.m., around the time of the shooting.

Allmond gave Thomas’ name to police, who began a manhunt. After two days, Thomas turned himself in.

Mcneill was hospitalized for more than a year after the shooting and uses a wheelchair.

In the most recent trial, the defense sought to cast doubt on the testimony of Higgs, who Ott said was “the only identifying witness.”

Higgs had pursued the shooter in the blue Lincoln Town Car, Robinson said. After the shooting, police had shown Higgs a photo array of possible suspects, and Higgs had said he was 70 percent certain that Thomas was the man he had chased, Ott said.

Ott said Higgs’ initial uncertainty undermined his testimony, and he attacked other aspects of Higgs’ account.

“Bruce Higgs is making up information,” Ott said.

Robinson defended Higgs’ testimony. Higgs’ mind was racing after the crime, she said, which is why he was not completely sure about the identity of the suspect. Higgs has testified since that he is certain about the perpetrator’s identity, Robinson said.

Robinson said other evidence linked Thomas to the crime. A blue Lincoln Town Car like the one Thomas lent to Allmond shortly after the shooting was seen on CCTV footage in the vicinity of the crime beforehand, she said. And a witness testified to seeing the shooter get into a blue Lincoln after firing at Mcneill.