Correction: This article has been updated to correct the terms under which Jeffers was freed from prison.

A D.C. police officer raises police tape for a pedestrian to walk under following a shooting on Georgia Avenue. (Pablo Martinez Monsivais/AP)

A man who D.C. police said randomly fired a gun outside a grocery store on crowded Georgia Avenue in Petworth on Wednesday afternoon before being shot by an officer has been identified as a 22-year-old from Northwest Washington.

Police said Thursday that Marc Jeffers faces charges that include assault with a dangerous weapon, carrying a gun without a license, unlawful possession of a firearm and discharging a firearm. He was recovering early Thursday at a hospital and thus did not have an initial appearance in D.C. Superior Court.

Jeffers’s last known address is in 16th Street Heights, about a mile north of the Petworth Metro. He was sentenced in 2010 to three years in prison for robbing an Ethiopian restaurant on 14th Street Northwest, according to court records. He is on supervised release in that case until May 2018.

His relatives could not be reached Thursday.

No bystanders were hit Wednesday, and police said they could not find any damage to buildings or vehicles. A police report says the man was armed with a .45-caliber Glock handgun.

D.C. police investigate a shooting Wednesday near the Petworth Metro station. (Peter Hermann/The Washington Post)

Authorities and a witness interviewed at the scene said the gunman walked north on Georgia Avenue starting at Quincy Street NW, steps from the Petworth Metro Station, and started shooting as he headed toward Randolph Street about 1:45 p.m.

The witness, David DaSilva, 37, said the man was walking along the east side of the street along a construction barrier and fired 10 to 15 shots. DaSilva said it appeared the man was shooting wildly in the direction of two Metro buses loaded with passengers and at the front windows of a Safeway grocery store.

Video taken by two people and broadcast on WRC-TV shows panicked customers in the store dropping grocery bags and scattering.

[D.C. police officer shoots man who authorities say shot randomly in Petworth]

Police said a bystander notified a D.C. police officer riding a mountain bike, and the officer confronted the man at Georgia Avenue and Randolph Street. DaSilva said the officer pointed his gun at the man and demanded three times that he drop his gun. “Then he fired,” DaSilva said of the officer.

The police report says the suspected gunman, wearing a dark-colored shirt and light-colored pants, at one point pointed the gun at a person on the street. The report says that when the officer ordered the man to drop the weapon, “The suspect raised the firearm again toward the unknown complainant, at which time the involved officer discharged his service pistol striking the suspect.”

Police did not identify the officer involved.