It was a Friday afternoon in October and Lamar Hicks was walking through Southeast Washington, on the way to buy a pack of cigarettes and visit his infant daughter, when he heard gun shots. Someone had fired at the driver’s side of a parked burgundy Chevrolet and shot a man to death.

Within hours, Hicks was under arrest in a killing he insisted he did not commit.

Court papers said surveillance cameras mounted outside nearby merchants showed Hicks — wearing a white shirt, black pants and a black bag slung across his chest — approaching the victim at the time of the shooting and then fleeing the scene.

For 13 days, Hicks sat in a D.C. jail cell as his defense attorney and an investigator pored over those same videos. But they saw something different: The man police said was the gunman indeed had on black pants and a white shirt, but carried no distinctive black bag. And their client had a smaller build than the shooter, who was slightly taller with broader shoulders.

Just three hours after Hicks’s defense team took their case to the District’s U.S. attorney’s office, the charge was dropped and Hicks was released from jail.

“I just felt hopeless,” Hicks, 24, recalled. “I heard stories about innocent people being locked up and falsely accused. I couldn’t do anything but trust in my team.”

Hicks had only a Metro fare violation arrest in his history when detectives charged him in the Oct. 11 fatal shooting of 30-year-old Jonathan L. Jones of Cheltenham, Md. Jones was shot once in the neck around 3:30 p.m. in the 1900 block of 16th Street, according to court papers. Hicks was arrested that evening.

A day later, D.C. police, as is their practice in serious cases, issued a news release naming Hicks as the man charged in Jones’s killing. Several media outlets, including The Washington Post, published stories of Hicks’s arrest.

John Fowler, an attorney with the District’s Public Defender Service who represented Hicks, said his client is innocent, and he encouraged Hicks to tell his story to set the record straight. Fowler said he worries news coverage of the arrest will follow his client for the rest of his life, potentially impacting jobs, housing or other prospects.

“This wasn’t an arrest for something that could be considered minor,” Fowler said. “This was murder.”

Soon after Hicks’s arrest, Fowler and an investigator secured surveillance videos from a convenience store and a liquor store that were central to the police case. After watching some 200 clips that included the minutes leading up to the shooting and the minutes after, they noticed physical differences between the man caught on camera standing next to the car’s driver-side window and their client.

D.C. homicide detectives who reviewed the videos wrote in a court affidavit — which was later adopted by federal prosecutors — that the killer wore a black bag strapped over his chest when he walked up to Jones’s vehicle and began firing. While Hicks is seen in multiple videos around the time of the shooting wearing such a bag, the man captured on video walking up to the car, and then running away, was not.

“In the end, it really was just a video clip that contained five minutes of footage of the actual shooting that cleared Mr. Hicks,” said the investigator, Ellie Olsen. “It wasn’t hard. We realized instantly that the person they identified as the shooter wasn’t Mr. Hicks.”

Fowler theorized that lead detective Chanel Howard worked backward in the investigation by identifying Hicks with the bag from the videos and then wrongly assigning that identification to the shooter.

D.C. police spokeswoman Brianna Jordan said the case remained open but declined to comment further. Howard did not return phone calls.

Jones’s family could not be reached for comment.

When Fowler and Olsen watched the videos, evidence in addition to Hicks’s bag stood out. The two also compared the body sizes of Hicks and the shooter. The gunman, who a witness identified as a little over 6 feet tall, appeared in the video to be taller and to have broader shoulders than Hicks, who is 5-foot-8, Fowler said.

Fowler and Olsen could not challenge a witness who picked Hicks out of a photo array because that person’s identity had not yet been revealed. Prosecutors often do not reveal the names of witnesses until closer to trial, which usually takes about a year or two in a murder case.

With the videos in hand, Fowler and Olsen rushed to the U.S. attorney’s office and met with Assistant U.S. Attorney Laura Bach. Bach, a longtime homicide prosecutor in the District, was the lead prosecutor in last year’s trial of a Maryland man who was convicted in the 2015 slayings of three members of a Northwest Washington family and their housekeeper.

Bach, who is now a supervisor in the office overseeing homicide cases, watched the videos closely as Fowler and Olsen played them on Olsen’s laptop and pointed out the inconsistencies. Howard, the detective, and Assistant U.S. Attorney Shehzad Akhtar, the lead prosecutor on the case, joined them.

After Fowler and Olsen left, Bach ordered the charge against Hicks dismissed without prejudice, meaning authorities can recharge him if there is additional evidence. By 10 p.m., he was released from jail. Hicks said he walked the 30 or so minutes home that night.

What most angered Fowler was not only that Hicks spoke to detectives without an attorney present, he said, but that Hicks’s demeanor was noted in the charging documents as evidence against him. The detective wrote Hicks was “freakishly calm” during questioning.

“That’s exactly how an innocent person would act,” Fowler said. “Calm.”

Authorities used that description, Fowler said, to argue to a judge that Hicks had no remorse, was a danger to the community and should be held in jail until trial. At Hicks’s initial hearing a day after his arrest, D.C. Superior Court Judge Juliet McKenna ordered him jailed until trial.

“I wasn’t calm. I was terrified,” Hicks said.

Hicks said he spoke to the police because he “trusted” them. He said he knew the officer who picked him up in the squad car from seeing the officer in the neighborhood numerous times before the shooting. The officer drove him to the precinct to meet with homicide detectives.

“I knew I didn’t do anything wrong and I felt the police were just doing their job and I was helping them” by providing information on the shooting.

But for Hicks and his attorney, their fight is not over. A Google search under Hicks’s name resulted in information about Hicks’s arrest, including the police news release and several media stories.

In a statement, Kadia Koroma, a spokeswoman for the U.S. attorney’s office, acknowledged that it was the evidence and discrepancies discovered by Hicks’s legal team that led prosecutors to dismiss the charges.

That new information, Koroma wrote, “undercut” the probable cause that homicide detectives used to charge Hicks. Koroma declined to comment further on the investigation.

When police departments issue news releases about an arrest, it is partly to inform the community that the person police believe is responsible for a violent crime is off the street. But the outcomes of many cases go unnoticed.

And Hicks said police officers still have not returned his identification, a cellphone charger and the money he had on him when he was arrested.

Despite what happened, he still has confidence in the justice system.

“I always believed the truth will set you free,” Hicks said.

Eddy Palanzo contributed to this report.