President Joe Biden on Thursday visited Police Headquarters in Lower Manhattan, where he delivered his full-throated support for Mayor Eric Adams’ efforts to combat violent crime.

“Mayor Adams, you say that gun violence is a sea fed by many rivers,” Biden said during his remarks preceding a meeting with law enforcement and elected officials focused on crime-solving strategies. “Well, you know, I put forward a plan to dam up some of those streams. You can count on me to be a partner in that effort."

The event was a display of unity among city, state, and federal officials around the precipitous rise in gun violence across major U.S. cities, which could likely be a factor in the midterm elections.

But success in stopping the flow of illegal guns has eluded Democrats for decades. Most of the guns seized by the NYPD have been traced back to states with looser gun laws and attempts to pass gun control measures in Congress have perennially failed.

Flanked by Adams and Gov. Kathy Hochul, Biden held up New York City as a model for its strategic partnerships with federal, state and local officials. He said that he wanted to help “every major city follow New York’s lead.”

The visit underscores the growing relationship between Biden and Adams, which could be mutually beneficial. On Thursday, Adams recalled his exchange with Biden during his recent visit to the White House.

“He grabbed me by my arm and turned me around and looked into my eyes, and he says, ‘Eric, what can we do?’” the mayor said.

Before the gathering, the White House announced expanded measures under the U.S. Department of Justice to combat the rise in violent crime across the country. They include increasing resources for a task force focused on cracking down on the so-called “Iron Pipeline,” the illegal gun trade that traffics firearms from the south to states along the eastern seaboard; providing training for prosecutors on bringing cases against those who sell ghost guns, which are firearms assembled from kits; and prioritizing federal prosecutions of individuals who illegally sell or transfer guns used in violent crimes.

Biden also said he would direct $200 million toward community intervention programs through his proposed budget and called on Congress to add $300 million in federal grants for law enforcement agencies. States can currently use some of the $350 billion in stimulus funding to hire more police, Biden said.

The president has tried to tamp down criticism over the support by some members of his party for the “defund the police” movement and embraced Adams’s call for a balance between policing and investment in low-income communities and intervention programs.

“Look, as I said, we're not about defunding,” Biden said. “We're about funding and providing the additional services you need, beyond someone with a gun strapped to their shoulder.”

Other Democrats have also spoken out against calls to reduce police funding. Earlier in the day, Bronx Rep. Ritchie Torres told MSNBC, "The defund police movement is dead in New York City.”

“Good riddance,” he added.

The president arrived one day after the funeral for one of the two police officers slain less than two weeks ago in a Harlem shooting. Before the event began, Biden motioned to Sumit Sulan, the 27-year-old NYPD officer who participated in the response to a domestic violence dispute that killed his fellow officers. Police said Sulan, a rookie, fired the shots that killed the alleged gunman, LaShawn McNeil, and was later hailed as a hero. The president then led a standing ovation.

Since winning the primary, Adams has basked in the national spotlight. He has sought to frame his blue-collar background and more centrist positions on public safety as the future of the Democratic Party.

But after a spate of violent incidents, the mayor has been under increasing pressure to deliver on his campaign promise of improving public safety. Last month, he announced a plan that called for a range of approaches — from bringing back a plainclothes unit of police officers, to investing in summer jobs.

Adams said he asked the president to visit New York City so as to mount a response to gun violence similar to the way federal officials rallied around the city in the aftermath of 9/11.

He said he also invited Biden to see up close one of the city’s violence intervention programs. Following the meeting at police headquarters, Biden and Adams were headed to a public school near the Queensbridge Houses —  a public housing complex in Long Island City where the introduction of a Cure Violence program was followed by a year without any shootings.

Hochul, a Democrat who is running for her first full term, praised Biden for making the visit and touted the cooperation between herself and Adams as well as other elected officials. Late last month, the governor formed an interstate task force on illegal guns that brings together law enforcement officials from nine states in the Northeast.

“For the first time in my life, I'm seeing a unification of purpose that has been missing,” Hochul said.

Nonetheless, many Democrats have cautioned against leaning on excessive policing to bring down crime. Rep. Nydia Velázquez of Brooklyn, a member of the Congressional Progressive Caucus who joined the event, urged the president to focus on tackling the root causes of crime.

“We know what works and what doesn’t work,” she said. “We must recognize that mobilizing community-based resources, job opportunities, and early intervention are key to protecting our youth from gun violence.”