RICHMOND — Mayor Levar Stoney said he had requested and accepted the resignation of Police Chief William Smith after two nights of tense demonstrations that involved chemical gas and rubber bullets outside the city's police headquarters.

Those standoffs marked a violent deterioration in relations between police and the community, which had already been strained by more than two weeks of protests sparked by national outrage over police brutality against African Americans.

“One thing is clear after the past two weeks — Richmond is ready for a new approach to public safety,” Stoney (D) said Tuesday afternoon in a hastily called news conference at City Hall.

Hundreds of protesters returned to downtown Tuesday evening, gathering in a park and walking along streets. But shortly after 11 p.m., some demonstrators toppled the Richmond Howitzers Monument, a Confederate statue near Virginia Commonwealth University’s Monroe Park campus. They then dispersed.

Earlier in the evening, demonstrators briefly stopped at the Richmond police headquarters, where a massive barricade had been installed consisting of enormous concrete pipes standing on end like a medieval wall.

Asked about the contrast of calling for more community engagement while turning the building into a fortress, Stoney said the city had to guard against violence from people trying to hijack peaceful Black Lives Matter protests to cause mayhem.

“There is a small contingent who are bent on another agenda . . . that doesn’t involve looking out for the black men and women who the cause was originally about,” said Stoney, who is African American.

Stoney named Maj. Jody Blackwell, a 23-year department veteran, as interim chief and said he would conduct a nationwide search for a permanent replacement.

The mayor praised Smith, who rose up through the ranks to become chief last year, calling him “a good man.” But after 18 days of protests and reports of violence between demonstrators and officers, “I thought it was time for a new direction.”

The confrontations Sunday and Monday night were sparked by an incident Saturday in which a police SUV drove through a crowd of protesters and bumped several people, though there were no serious injuries. Stoney had previously asked the local commonwealth’s attorney for a “full investigation” into the Saturday incident.

In a statement after Sunday’s standoff, Smith said the demonstration had “escalated into rioting and violence” and that officers had shown “great restraint in response to these attacks.” Richmond police said that three officers were injured and several vehicles and buildings were damaged or vandalized and that pepper spray was deployed after demonstrators ignored warnings to disperse.

Earlier this month, Stoney also called for a disciplinary review of officers who tear-gassed peaceful demonstrators at the statue of Confederate Gen. Robert E. Lee on Monument Avenue.

Smith, who is white, had struggled to project a consistent tone to the city’s African American community during the recent protests. On June 1, he urged residents to come out to demonstrate and pledged police sympathy, but that evening, officers fired tear gas without provocation. The police department initially blamed protesters for endangering the officers, but then Smith apologized and said the officers involved would be disciplined.

He appeared with Stoney the next day before an outraged crowd of more than 1,000 outside City Hall and took a knee to show his support. But he seemed at a loss for how to calm those gathered.

After the SUV incident last weekend, and Smith’s defense of the aggressive use of pepper spray and irritant gas during the recent standoffs at police headquarters, the police chief apparently lost Stoney’s support.

At a news conference Tuesday to announce Smith’s departure, Stoney said the priority for the chief should be to engage with the community and resolve issues of police use of force and oversight by citizens.

“We don’t begin that progress without the buy-in of people — all people from all walks of life,” Stoney said.

Hours after Stoney’s announcement, protesters gathered at Monroe Park before marching to other sites. Among those in the crowd were a handful of people armed with semiautomatic or assault-style guns. One of them, a man who declined to give his name, said the police chief’s exit “could be a step in the right direction.” He said he was armed to show support for the demonstrators and “to try to keep everybody safe.”

The crowd made its way to the police headquarters around 10:40 p.m., stopping briefly before moving on. They chanted “Our Streets” as they walked.