The governor of the US state of Virginia, Ralph Northam, has declared a state of emergency and temporarily banned all guns and weapons from the area around the Capitol in Richmond before a major gun-rights demonstration set for next week.

Northam, who is leading the push for stronger gun laws in his state, said he wants to avoid a repeat of the violence that erupted at a 2017 white supremacist rally in Charlottesville, when a march by white nationalists erupted and led to the death of a counterprotester, 32-year-old Heather Heyer.

"Law enforcement intelligence analysts have identified credible threats of violence surrounding the event, along with white nationalist rhetoric and plans by out-of-state militia groups to attend," the governor's office said in a statement on Wednesday.

More:

Gun-rights advocates, including militia groups and ultraconservative activists, are planning a "Lobby Day" rally on Monday, seeking to block gun control legislation backed by Northam, a Democrat, and the Democratic-controlled state legislature in both the General Assembly and Senate.

The state of emergency will continue until Tuesday at 5pm (22:00 GMT).

Last week, Virginia legislators approved a new gun policy prohibiting firearms inside the Capitol and a nearby office building, but did not extend the ban to Capitol Square, the public space outside that includes monuments to prominent Virginians and the Virginia Civil Rights Memorial.

The governor saw credible threats of potential violence after a series of provocative online postings from out-of-state pro-gun and militia groups that plan to attend, one official told The Associated Press news agency.

On official, speaking to the news agency, cited a posting that included a photo of an AR-15 and said there are "great sight angles from certain buildings" near Capitol Square.

Virginia law enforcement officials have been criticised for their planning and response to the 2017 Charlottesville rally.

Northam's declaration will also ban items like helmets and shields, items that some white nationalists carried in Charlottesville.