Virginia Gov. Ralph Northam and the city of Charlottesville declared states of emergency Wednesday ahead of the first anniversary of last summer’s white supremacist rally that turned deadly.

The declaration, which took effect Wednesday afternoon and could run through Sept. 12, will increase state and local law enforcement’s capacity to respond to civil unrest that may occur as white nationalists and neo-Nazis and counterdemonstrators mark the rally’s anniversary this weekend.

“Declaring this state of emergency in advance of the anniversary and the related planned events will help us ensure that the state and the city have all available resources to support emergency responders in case they are needed,” Northam (D) said in a statement.

The declaration also earmarks $2 million of state money to pay for the response efforts.

The city expects a large crowd for its planned commemoration of the three people who died Aug. 12 — counterdemonstrator Heather Heyer, who was killed when a man drove his car into a crowd, and two Virginia state police troopers who were killed in a helicopter crash as they monitored the day’s events. But officials are preparing in case other violent clashes break out.

“It’s hard to believe it’s been a year ago that we had the tragic events in Charlottesville,” Col. Gary T. Settle, superintendent of the Virginia State Police, said at a news conference Wednesday. “And it’s unfortunate we’re here this year planning for potential violence and potential civil unrest again.”

The violence at last year’s rally seemingly caught the city flat-footed, raising questions about its preparedness. A scathing independent review criticized the city’s response, and the fallout was widespread, leading to the police chief’s resignation and leaving the city manager’s contract unrenewed.

It would be irresponsible if city officials didn’t plan differently, said Brian Wheeler, director of communications for the city of Charlottesville.

“We acknowledge that mistakes were made last year, and we’re implementing best prac­tices this year,” he said.

At the Wednesday news conference, law enforcement officials said residents and visitors can expect a heavy police presence throughout the weekend. Officers from Charlottesville and Albemarle County, along with state troopers and the Virginia National Guard, will total well over 1,000 and constitute one of the largest deployments of law enforcement personnel in the state’s history, Wheeler said.

“We hope we have a safe weekend so that healing can continue,” interim city manager Mike Murphy said at the briefing. “The only acceptable outcome is that we ensure public safety.”

In downtown Charlottesville, beginning Friday evening, several streets will be closed to vehicles and police will set up a tightly patrolled security area with just two entry points. It will be illegal for those over the age of 16 to wear masks or other ­identity-obscuring apparel, and the city has published a lengthy list of items that will be prohibited in that area — ranging from ice picks and swords to catapults and nunchucks. Paintball guns, BB guns and pellet guns are banned, too, but firearms are not.

“We still have to honor your Second Amendment rights,” said Charlottesville Police Chief RaShall Brackney, who also acknowledged that guns and large, potentially volatile crowds are “not a very healthy mix.”

Law enforcement has made several adjustments to its plans this year based on feedback from community members, Brackney added.

After last year’s brawls and marchers’ racist and homophobic chants, many residents expressed fear leading up to this weekend. Police are making extra patrols in and around those communities that may feel vulnerable because of race, religion or ideology, Brackney said.

Agencies have worked together for months to come up with their action plans, said Jeff Stern, state coordinator at the Virginia Department of Emergency Management.

“We are treating this as a statewide event,” he said.

Many of those responsible for last year’s violence have either made plans to go elsewhere or have signed consent decrees that prohibit them from returning to Charlottesville, Wheeler said.

The organizer of last year’s “Unite the Right” rally, Jason Kessler, was unsuccessful in his effort to obtain a permit from the city to hold a sequel there this weekend. After a court battle, Kessler withdrew his request. Instead, he plans to hold “Unite the Right 2” in the District, where the National Park Service has given him initial approval to hold a rally across from the White House on Sunday.