Tens of thousands of households and businesses in central North Carolina were left without power for days as authorities investigated what they described as an orchestrated gunfire attack that disabled two substations.

As of Wednesday afternoon, about 5,000 customers remained without power, according to Duke's website.

"Duke Energy anticipates having nearly all customers restored by 11:59 p.m. Wednesday in the aftermath of an attack on two major substations Saturday in Moore County," the company, which provides power to the area, said in a statement.

A total of 45,000 people had lost power after the shootings. That represented nearly all customers served by the company in Moore County, Duke Energy spokesperson Jeff Brooks said earlier this week.

North Carolina Governor Roy Cooper on Tuesday said "a serious national conversation" about protecting critical infrastructure was needed after the attack.

Federal law enforcement officials were helping an investigation into the situation, which was also monitored by the White House.

On Saturday night, utility workers investigating reports of widespread outages found gates broken and evidence of gunfire damage to equipment at two substations in the county.

The area is popular with tourists and known for golf resorts including Pinehurst, which has hosted the U.S. Open and Ryder Cup tournaments.

"This was a malicious criminal attack on the entire community that plunged tens of thousands of people into darkness," the North Carolina governor told CNN.

Schools across the county of 100,000 people canceled classes for students for a third day on Wednesday and planned to continue the cancellations on Thursday. A decision on whether to reopen them Friday will be made later.

A curfew was imposed earlier amid freezing nighttime temperatures.

(Reporting by Kanishka Singh in Washington, editing by Deepa Babington)

By Kanishka Singh