PITTSBORO, N.C. — The copper statue was lifted off its pedestal in the middle of the night, a crane hoisting it by straps toward a waiting flatbed truck as about 40 people stood watching in the drizzle.

Opponents of the Confederate monument cheered, sang a couple lines of “The Battle Hymn of the Republic” and laughed as the statue floated downward.

Down the street, pro-monument activists maintained a grim vigil. They had been showing up almost weekly to demonstrate support for the statue of a Confederate soldier, now at the center of a legal battle that could upend a four-year-old state law meant to protect such memorials across North Carolina.

Standing for 112 years in this small town about 30 miles west of Raleigh, the Confederate monument is the fourth to be removed in North Carolina during the past three years. The first was pulled down by protesters in Durham two days after the murder of Heather Heyer in a car-ramming attack by a white supremacist at the 2017 Unite the Right rally in Charlottesville. The second, “Silent Sam,” was torn down by protesters at the University of North Carolina at Chapel Hill in August 2018.

But the two most recent removals were executed by order of local governments, testing the strength of a law passed by the Republican-controlled state legislature in 2015 that bars removal of “objects of remembrance” from public property, with limited exceptions. The law was adopted shortly after anti-Confederate sentiments surged in the wake of the massacre at Emanuel AME Church in Charleston, S.C., where nine worshipers were killed in a racially motivated attack.

In March, the city of Winston-Salem declared its Confederate monument to be a public nuisance and took the statue down. Then in August, the Chatham County Board of Commissioners voted to remove the copper statue, which held a commanding position in front of the old courthouse-turned-museum that occupies the middle of a roundabout in the center of town. The removal followed a series of dueling protests that had led to dozens of arrests over the past two months.

“It is not exclusively homage to the soldiers who died but a constant reminder of the brutality, second-class status and political power the white population has and can exercise over our citizen neighbors with dark skin,” Commissioner Diana Hales said before the vote.

Now Chatham County and Winston-Salem are embroiled in lawsuits with the United Daughters of the Confederacy, which sponsored the monuments in the early 20th century.

Confederate monuments — typically a “Common Soldier Statue” depicting a uniformed man with hands on the barrel of a rifle, standing atop a granite pedestal — are a ubiquitous feature of the North Carolina landscape. From 1902 to 1960, the United Daughters erected or sponsored a spate of monuments in front of county courthouses, according to a survey of North Carolina monuments published by UNC-Chapel Hill. All but three were erected in the three decades following the 1898 Wilmington coup, when a white mob murdered dozens of black people and overturned an elected, multiracial city government. Two years later, the election of Charles Aycock as governor consolidated the political power of white supremacy and ushered in the Jim Crow era in North Carolina.

At issue in both lawsuits is who owns the monuments. The Winnie Davis Chapter of the United Daughters of the Confederacy contends that the monument is public property and, therefore, removing it violates the 2015 monuments law. But the county cites a 1907 license that permits the United Daughters to erect the statue on the courthouse square and states that the monument would “remain in the care and keeping” of the group. As such, the county argues that it can lawfully terminate the license and declare the monument a public trespass.

The application of the 2015 ban on Confederate monument removals has become murky in part “because many of the counties may not have taken ownership of the statues,” said Randy Voller, a former four-term mayor of Pittsboro and former chair of the North Carolina Democratic Party. “It looks like there’s a loophole here.”

At a Nov. 13 hearing, North Carolina Superior Court Judge Susan Bray denied the United Daughters’ motion for a preliminary injunction to prevent the county from removing the monument as the lawsuit unfolds, finding that the organization failed to show that it is likely to win the case.

The case in Winston-Salem was less murky, as the old county courthouse that hosted that monument was sold to a private developer based in Richmond in 2014 and converted into upscale apartments.

The Chatham County case has particularly contentious in part because of its location.

Split between progressive-leaning suburbs of Chapel Hill in the northeast and more rural, conservative areas in the west, Chatham County is a cultural bellwether for North Carolina. Voters across the county backed Hillary Clinton in the 2016 election, while Donald Trump carried upward of 85 percent of the vote in some rural precincts.

A Nov. 20 Elon University poll found that 65 percent of the state’s residents believe that Confederate monuments should remain on government property. But the poll found sharp divisions on the question taking party identification and race into account, with 91 percent of Republicans asserting that the monuments should remain in public spaces, compared with only 36 percent of Democrats. The poll found that 77 percent of white residents supported maintaining monuments in public spaces, compared with only 27­ percent of black people.

The divisions reflect drastically different understandings of why the Civil War was fought, with nearly 49 percent of respondents stating it was mainly about states’ rights and more than 44 percent saying it was mainly about slavery. Among those who said the legacy of slavery has little effect on the position of black people in American society today, 92 percent said the monuments should remain on government property. Among those who said the legacy of slavery holds a great deal of influence over the current status of black people, 63 percent wanted the monuments removed.

Among the most contested of the remaining Confederate monuments in the state is “Fame,” erected by the United Daughters in Salisbury in 1909. The 23-foot-tall bronze sculpture depicts a winged figure supporting a dying soldier with the inscription: “Soldiers of the Confederacy, fame has given you an imperishable crown. History will record your daring valor, noble sufferings and matchless achievements, to the honor and glory of our land.”

Various organizations and individuals have asked the Salisbury City Council to remove the monument, said Mayor Al Heggins, who was the first black woman elected to the council in 2017. Heggins has not taken a position on the monument, she said, “because I don’t want the issue to be me and not focus on what the conversation is really about.”

In an op-ed published in the Salisbury Post in June, she divulged that her ancestors include a Confederate soldier descended from a German immigrant and Africans brought to America as chattel slaves.

“We cannot deny the layers of identity associated with Confederate symbols,” Heggins wrote. “These symbols represent revered Confederate soldiers, Southern heritage, a lost war, lost lives, a yearning for the antebellum South and a time in our nation that was dangerously divided. The meanings associated with our Confederate monument are as intertwined as our ancestries.”

Heggins said the Chatham County case will not necessarily influence what happens to the monument in Salisbury. Her city’s circumstances are unique, she said, because the board of aldermen issued a grant of perpetual use of public lands to the United Daughters in 1908.

Regardless, the city will continue to struggle over what to do with the monument.

“I don’t think the community has put it on the back burner,” Heggins said.

In addition to real estate issues, attorneys for Chatham County and Winston-Salem also have cited public safety as a reason for removing the monuments, one of few exceptions allowed by the state ban, according to a 2017 blog post by Adam Lovelady, an associate professor of public law and government at UNC-Chapel Hill.

The Unite the Right rally “showed the potential for threats to public safety surrounding an object of remembrance,” Lovelady wrote, while “the toppled statue in Durham displayed the potential of an unsafe and dangerous condition when protesters pull down a monument.”

In an affidavit filed on Oct. 29, Mike Dasher, chair of the Chatham County Board of Commissioners, cited the “several contentious interactions” between opposing groups in Pittsboro. He noted an Oct. 19 incident in which two anti-monument protesters blocked another protest group’s front-end loader, “creating a situation where bodily injury could be sustained” and a violation of “criminal laws” could occur. Since January, he said, the county had spent $103,000 on security for the monument because of the protests.

Dasher wrote in his affidavit that the commissioners had ordered the county manager to have the monument “securely preserved and stored” until the United Daughters find an appropriate location for it.

Even after the county removed the monument, conflict has continued. Pro-monument groups have erected Confederate flags across the county in protest, with a group called the Virginia Flaggers announcing that it had raised two new flagpoles in Pittsboro in the days following the removal, reaching a total of six.

The most controversial flag site, marked before the monument came down, is across the street from a historically black middle school named after George Moses Horton, an enslaved person who was the first African American to publish a book in the South. Two days after the Confederate flag was raised there, as two opposing groups prepared for another round of protests, they discovered that a vandal had cut down the flagpole and left a pile of welded nails around the base.