A 22-year-old Maryland man has been arrested in a July 4 shooting that left a young man dead.

Calvin Shaw of Laurel was arrested Sunday by a regional fugitive task force and has been charged with first-degree murder while armed in the death of Crevontai Key, 19, of Northwest, police said.

The shooting happened around 8 p.m. Wednesday as a large group gathered in the 5000 block of First Street NW. Police said three men approached the group on foot, each with a handgun, and began firing.

People who were at the scene of the shooting said they didn’t realize anyone had been shot at first, mistaking the sound of gunshots for fireworks. But four were hit including Key, police said; three were taken to a hospital by emergency responders.

A fourth victim was taken to a hospital by family members, treated and released, authorities said.

According to documents filed in D.C. Superior Court, one of the shooting victims identfied Shaw as one of the men who fired on the group — and part of a group known as “KDY” that hangs out in the area of 7th and Kennedy Streets NW.

Shaw pulled out a silver .380-caliber semiautomatic pistol and began firing, the documents said; the victim who identified him was shot along the top of his head.

Shaw is the only person to be charged in the shooting so far, and only with the death of Key. Shaw agreed that he was part of the “KDY” group when questioned by police, according to the court documents, but both he and his girlfriend told detectives they were together during the shooting.

At a Monday hearing, Shaw was ordered held ahead of a July 19 hearing.

Police on Monday declined to provide more information about the incident or their investigation.

A few hours after Key was shot, police said, another man was killed in D.C. gunfire. Jerome Ellington, 35, of Northwest was killed at a cookout at about 2:20 a.m. Thursday in the Petworth area . Police have not announced an arrest in that case, which they believe is unrelated to the Key shooting.

The July 4 killings marked the beginning of a spate of deadly violence in the District. Three men were killed in a few hours in separate incidents late Saturday and early Sunday.

This item has been updated.

Read more: The Post’s crime coverage