WASHINGTON — White supremacists held a rally in Washington on Sunday, and almost no one but their opponents and the police showed up.

Jason Kessler, one of the organizers of last year’s violent and deadly Unite the Right rally in Charlottesville, wanted to hold an anniversary demonstration there, but the city wouldn’t let him. So he brought his show to Washington, where he hoped 400 supporters would join him for a rally at Lafayette Square, across from the White House. Fewer than 40 turned out.

The group was met by thousands of protesters who filled their half of the leafy, 7-acre park chanting “Go home, Nazis!” “No Trump! No KKK! No fascist USA!” and “Black lives matter!” They drowned out whatever message Kessler and his small band of followers had hoped to deliver – and that was their goal.

For opponents, the day felt like a victory, albeit an often tense and angry one.

Samaj Calhoun, a Southwest Washington resident, came to protest the rally with friends to show they wouldn’t be intimidated by the white supremacists. Calhoun said she hopes the rest of the country watching the District sees “that we’re not afraid. And we can defend our city.”

City leaders and law enforcement officials were determined that the event not be a repeat of the mayhem in Charlottesville last year, when city police and Virginia state troopers allowed white supremacists and neo-Nazis to clash in the streets with anti-hate protesters. Counterprotester Heather Heyer was killed when a man police say identified himself as a Nazi drove a car into a crowd. Two state troopers died when their helicopter crashed following a day of monitoring the civil disturbance.

A massive police presence Sunday kept the two sides separated, and outside of a confrontation between some antifa, or anti-fascist, protesters and police long after the rally had ended, there were no reports of violence. Police reported that one man was arrested after he punched a man wearing a “Make America Great Again” hat.

D.C. Mayor Muriel E. Bowser, a Democrat, said last week the city would ensure that the rallygoers could exercise their right to free speech – even if what they were saying was distasteful.

“While we are opposed adamantly to what we are going to hear, we know what our responsibility is – to protect First Amendment events, to protect Washingtonians and to protect our city,” she said.

Bowser returned to the District Sunday afternoon from a trip to El Salvador to supervise the city’s response. She planned to return to El Salvador on Monday morning to finish the sister-city trip.

For law enforcement, getting Kessler and his followers to and from the event without incident proved the biggest – and most controversial – challenge.

Kessler and his supporters arrived a little before 1 p.m. at the Vienna Metro station, where they were accompanied by law enforcement officers onto the rear car of a waiting train. After disembarking at the Foggy Bottom Metro station, a larger police contingent, including officers on bicycles and motorcycles, escorted the group on a walk of several blocks past protesters who shouted and chanted at them. Once inside Lafayette Square, protesters were kept far away from Kessler’s group.

Critics, including two D.C. Council members and the union representing Metro employees, lambasted the transit agency for providing the group extra protection after having said last week that its members would not be given special treatment.

“Giving white supremacists & hate groups a private Metro rail car is so unbelievably wrong & disgraceful. Beyond the horrible precedent it sets, what does it tell the riding public & operators? Plus, it’s the exact opposite of what @WMATA said they’d do,” council member Charles Allen, D-Ward 6, tweeted.

At Lafayette Square, protesters continued to yell and chant, and some, including a small contingent of antifa members dressed in black, hoped for a showdown with the white supremacists when the rally ended a little before 5 p.m. Police acted quickly to spirit Kessler and his followers out of the area in white vans to the Rosslyn Metro station, where they boarded a train to return to Vienna. Fairfax County Executive Bryan Hill said police were stationed along Interstate 66 to make sure no one tried to throw debris onto the train tracks or cause any other trouble.

Antifa members vented their frustration at not being able to confront the rallygoers by lighting smoke bombs and firecrackers and throwing eggs at federal buildings downtown. By then, a steady rain was falling, however, and the protest was fizzling. Most began heading home, but police kept a watchful eye as the black-clad group carrying umbrellas wandered about knocking over trash cans, chanting “Bust a window!” and yelling at police to get out of their cars and “meet us in the streets.” A confrontation between the protesters and police erupted briefly near 13th and G Streets NW.

While police were successful at keeping the opposing groups apart, the effort came at what is expected to be a significant expense to the city for overtime and deployment of law enforcement resources. District officials said late Sunday they were still tallying the cost of the rally to the city. At least some of it would be reimbursed by the federal government, they said, because Kessler’s event took place on National Park Service land.

At the rally, Kessler spent much of his 15-minute speech defending last year’s Unite the Right rally and insisting, despite evidence to the contrary, that most of those who attended had been nonviolent.

Earlier in the day, Kessler spoke to several reporters at the Vienna Metro station. He said he and his group were there to promote free speech and to protest “white civil rights abuses.”

When asked whether he had anything to say to Heyer’s mother, Kessler offered his “condolences” but said police in Charlottesville should have blocked off the street where she was killed.

Several days after her death last year, Kessler tweeted, “Heather Heyer was a fat, disgusting Communist. Looks like it was payback time.”

Mikisa Thompson, who was on the front lines of the protesters in Lafayette Square, said she traveled to Washington from North Carolina. She said she specifically came out for people who were traumatized and beaten last year in Charlottesville, notably Heyer.

“That’s why I’m here, for Heather,” she said.

Other protesters voiced different reasons for showing up Sunday. At the Martin Luther King Jr. Memorial, about 20 protesters marched to the Lincoln Memorial while singing “We Shall Overcome.”

The group’s leader, Hawk Newsome, said Kessler had invited him and his group, Black Lives Matter of Greater New York, to attend this year’s Unite the Right rally.

“He thought that I was a friend, but I am not his negro,” Newsome said. “I am not some token black you can use to validate yourself.”

Instead of joining Kessler, he and other activists marched from the Bronx to Washington over the past 10 days to protest a range of issues. “I represent a contingent of marginalized people, and (white supremacists) stand in direct opposition to everything we fight for,” he said.