The homemade guns that fire shotgun shells, made by Jonathan Hemming. (N/A/Montgomery County court record)

The police officers who converged on Jonathan Hemming hoped for a calm arrest. And for a few seconds — as Hemming sat behind the wheel of a Honda Civic in a Maryland parking lot — things went that way.

The officers approached. A car door opened.

Then, suddenly, a struggle.

Hemming raised what appeared to be a black pipe, maybe 8 inches long, with tape wrapped around it. He began slapping one end of it.

The other end?

“Aimed right at my face,” said Montgomery County Police Detective Donnie Oaks.

Hemming’s homemade weapon, with tag, was aimed at a police officer. It was later successfully test fired by the ATF. (N/A/Montgomery County court record)

Oaks’s recollections, heard by jurors in a Montgomery courtroom, helped lead to Hemming’s conviction Wednesday on a charge of trying to kill Oaks with an operable, loaded, miniature 12-gauge shotgun.

Hemming, 54, was also convicted of first-degree assault of another officer, as well as three firearms charges, one ammunition charge and resisting arrest. The former Uber driver from Gaithersburg faces a possible life sentence in jail.

By all accounts, at the time of the parking lot chaos — on the afternoon of May 18, 2016 — Hemming was not on duty for Uber.

He instead had driven his wife to a doctor’s appointment, which the couple had just left, when the officers converged. At the time, Hemming was wanted on drug charges and detectives also wanted to question him about an unrelated case.

During the two-day trial, the handmade weapon was introduced as evidence. Jurors also heard from an examiner at the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF), who had evaluated the gun in a lab and successfully test-fired it.

Jonathan Hemming in 2016. (Montgomery County Police /Montgomery County Police )

“As far as an improvised pipe gun would go, it’s actually fairly evolved,” Ronald Davis told the jury.

He measured the device at 8⅞ inches long. It had a strong back end, with a tiny opening for a narrow screwdriver, which could be jabbed into the back end, piercing the ammunition and sending buckshot blasting out.

“There was a fair amount of thought that went into the design and construction of this item,” the ATF examiner testified.

A second, smaller homemade shotgun also was presented that was found in Hemming’s pocket when he was arrested. Neither gun was fired at police.

Hemming testified, moving slowly to the witness stand using a walker. He had seen examples of homemade shotguns on the Internet and built them quickly, he testified. “Both of them together, maybe 10 minutes,” he told his attorney, Ron Gottlieb, under questioning.

Hemming spoke emotionally about taking his wife, Mary, to a neurologist on the day of the arrest. She was suffering from a brain cyst and had problems with her spleen and liver.

“Her systems were failing,” Hemming said.

Hemming said they drove to the appointment with the two weapons because they had a suicide pact if the doctor’s news was bad. “One for me,” he said. “And one for Mary.”

His wife died, he told jurors, while he was jailed awaiting trial. “She died by herself,” he said.

Hemming challenged the testimony from officers. As police approached his car, he said, he had moved one of his guns to look for insurance papers, but said he did not point either gun at the officers.

A spokeswoman for Uber said Wednesday that Hemming had driven for the company for about eight months. He was removed from access to Uber the day after his arrest when the company heard from law enforcement, according to the spokeswoman.

Montgomery Detective Dimitry Ruvin, who was not one of the victims in the attempted shooting, testified that he had been interested in interviewing Hemming for a different case in May 2016 and that when he spoke with Hemming on his cellphone, Hemming told him he was in Florida. Ruvin learned later that he was much closer.

“At the time, he was working as an Uber driver,” Ruvin told jurors. “So I subpoenaed his Uber records and I learned he was in the D.C. area making pickups using his Uber vehicle.”

In closing arguments, assistant state’s attorney Douglas Wink questioned the claim of a suicide pact, saying there were three extra shotgun shells in the car Hemming was driving and that Hemming had said the couple, if they killed themselves, intended to do it elsewhere, after first going home to get a different car.

“It just doesn’t add up,” Wink said.