The officer was struck in the leg, police said, and the other two people shot were being treated at hospitals.
What led to the gunfire was not immediately clear.
Based on initial accounts, the incident followed a concert linked to the District’s Juneteenth celebration.
The concert was advertised under the name Moechella, a name given to concerts held a few years ago to protest the perceived suppression of go-go music in particular and Black culture in general.
It had been set to run from 4 p.m. to 8 p.m., but Contee said police had moved to shut it down early after two other incidents in the area.
The concert did not have a permit, he said.
In a brief account of the evening’s events, Contee said music was being played from a truck and several hundred people started to gather. At one point, he said, “some type of incident” happened at the concert and was broken up. Then, he said, a second incident occurred, and “people started to scatter.”
On Twitter, one person described the chaos: “There was some type of shooting or something at moechella. I ain’t never run and jump over people like that in my life,” the tweet read.
It was unclear whether a shooting precipitated the second incident.
After the second incident, Contee said, police began shutting down the event, asserting that it appeared unsafe.
He said police were in the area, along with emergency responders who came to treat the injured.
Later, a gun was seized, Contee said. The shooting occurred after that, he said, with police and rescue personnel still in the area.
Contee said initial indications suggested all four people had been shot with the same gun, and no information was provided to suggest that any of them had been targeted. The crowd was dense, he noted, and at one point about 100 police officers were present.
Contee said there was no indication that any officers had fired their weapons and no indication of any exchange of shots between victims or an assailant.
The gunfire at 14th and U streets NW was one of several shootings in the city on Sunday.
In one, a teenage girl was killed in the 4400 block of Third Street SE.