Protesters attempted to topple a bronze statue of President Andrew Jackson in a park next to the White House on Monday night but were thwarted when police intervened.

The scene unfolded dramatically as hundreds of demonstrators protesting police brutality locked arms around the statue in Lafayette Square shortly before 8 p.m., while chanting, “Hey, hey, ho, ho, Andrew Jackson’s got to go.”

Inside the metal pickets surrounding the statue, a smaller group — some clad in black with goggles, helmets and gas masks — scaled the statue and draped ropes around the seventh president astride a horse. Someone scrawled “killer” in black on the pedestal below.

But then, U.S. Park Police officers in riot gear approached from the west and clashed with the protesters, swinging batons and releasing pepper spray as they moved the protesters back.

President Trump tweeted his dismay at the attempt to remove the statue Monday night.

“Numerous people arrested in D.C. for the disgraceful vandalism, in Lafayette Park, of the magnificent Statue of Andrew Jackson, in addition to the exterior defacing of St. John’s Church across the street,” Trump wrote.

Trump also wrote Tuesday morning on Twitter that he has “authorized the Federal Government to arrest anyone who vandalizes or destroys any monument, statue or other such Federal property in the U.S. with up to 10 years in prison, per the Veteran’s Memorial Preservation Act, or such other laws that may be pertinent.....”

Interior Secretary David Bernhardt, whose agency oversees the Park Police, also weighed in on Twitter, saying he had just left the area of the protests.

“Let me be clear: we will not bow to anarchists,” he wrote.

It was not immediately clear if anyone had been arrested.

In a chaotic scene, a helicopter flew low over the park as 150 to 200 U.S. Park and D.C. police moved through the park. Officers used a chemical irritant to disperse protesters and sweep them back to H Street NW. Protesters did smash the wooden wheels of four replica cannons at the base of the Jackson statue.

Protesters threw things at police as they retreated, and officers shoved people in the melee. One woman hurled a folding chair, striking an officer, who staggered away from a police line. Things calmed down by 9 p.m.

Jackson was a former general in the U.S. Army and a populist politician sometimes compared to Trump in style. Known for his harsh treatment of Native Americans as president, he signed the Indian Removal Act, which led to the relocations of thousands of Native Americans and the deaths of thousands more. Jackson was also an enslaver.

As the protest unfolded Monday evening, someone spray painted “BHAZ” on the columns of the historic St. John’s Episcopal Church. A similar sign was spray-painted on a piece of plywood on H Street: “BHAZ: Black House Autonomous Zone.” The graffiti and sign appeared to be a play on the area that protesters have cordoned off in Seattle’s Capitol Hill neighborhood, dubbed the “CHAZ.”

The move Monday capped a day of skirmishes with demonstrators protesting police in the wake of the killing of George Floyd. On Monday afternoon, police and protesters briefly clashed as city officials attempted to clear out tents erected on a street near the White House.

D.C. Police Chief Peter ­Newsham said District officials had become concerned with the tents going up on H Street NW near Black Lives Matter Plaza. On Monday afternoon, police, along with other city agencies, moved in to remove the tents.

“They were creating a potential safety hazard,” Newsham said.

During the operation, ­Newsham said, some demonstrators resisted, and two officers were assaulted. He said police arrested two people and used pepper spray to move back the crowd.

D.C. Deputy Mayor Wayne Turnage said in a statement that the city was worried about campers’ exposure to traffic.

“We are always concerned when we have people staying in tents outside — it is not safe,” Turnage said in the statement. “It is also a serious concern if they are staying in tents in the middle of the road. Therefore, today, we deployed our interagency team to talk with the people staying on H Street and, eventually, to remove the tents.”

A city official said that they had approached the campers several times to explain the dangers of pitching tents in an open street but that they rebuffed requests to move.

The moments of tension followed weeks of mostly peaceful protests. The carnival-like atmosphere in recent days stood in contrast to looting and clashes between protesters and police that marked the opening days of the protests that followed the slaying of Floyd, an unarmed black man who died in police custody in Minneapolis.

Frederick Brown, 24, said a D.C. police supervisor shot him with pepper spray as he and other protesters tried to prevent the officers from clearing the encampment.

About seven or eight small tents had been set up in the street near St. John’s. Many of the protesters in the tents were helping with Earl’s Grill, which has been offering food for the asking since early on.

“We put the tents in the street so that cars wouldn’t be able to come through, so people could protest,” Brown said. “They came up here agitating because they want this street open.”

Brown, who said he has been at Lafayette Square since the protests began, said that sometime before 2 p.m., an official from the office of Mayor Muriel E. Bowser (D) gave the protesters a warning to leave, saying it was illegal to block the street.

But the protesters defied the order, and police began moving them out of the street. Brown said one protester was arrested after he grabbed water bottles from police bicycles and began dumping them. Brown acknowledged that he intervened to prevent police from arresting another demonstrator when he was hit with pepper spray.

“We have been out here every day feeding people for free,” Brown said. “We have been peaceful overall.”

D.C. police closed H Street on Monday afternoon for a time near Lafayette Square and Black Lives Matter Plaza. A few protesters shouted at officers who lined both sides of H Street.

Jim Hensel, a tourist from Chicago, said he watched police talking to people for over an hour, telling them they needed to get their tents out of the street. Hensel said that when police began pushing people back, things got more tense, with one protester soaking an officer with a fire extinguisher. Hensel got out of the way quickly.

By Monday evening, the tents had been pushed off H Street, but some remained on the sidewalk. Protesters had pushed construction barriers and sections of metal fencing into the street in the area to create roadblocks.

Peter Hermann and Julie Zauzmer contributed to this report.