— Inside a former U.S. military combat outpost, still ringed by curled barbed wire and blast walls, several massive generators are silent. Outside, factories that depend on the machines for electricity are either shuttered or on the brink of closing.

They are totems to one of the least-known American efforts to combat the Afghan insurgency: lighting up this strategic southern city, the cradle of the Taliban. But on this April day — nearly a year after U.S. troops vacated the base, leaving the Afghans in control — the more than $300 million American project to bolster the economy by supplying electrical power had literally broken down.

As the U.S. military’s presence and its aid dollars shrink, the cash-strapped Afghan government is unable to afford spare parts or fuel for the generators. Now, Kandahar, where Osama bin Laden ordered the 9/11 attacks, is growing darker, raising questions about the city’s stability and whether U.S. funds were properly spent.

A year ago, on good days, some enclaves received 12 to 16 hours of electricity a day. Today, sometimes weeks go by with no power at all, local officials and residents said.

“We are struggling to survive,” said Rohullah Noori, the marketing manager of Herat Ice Cream, which neighbors the base. “Our company’s life depends on electricity.”

Around this city, scores of businesses have closed or downsized as a result of power shortages. Un­employment is growing, as is resentment of the central government. Prices of basic necessities are rising, partly because of higher fuel costs to drive generators. Life has become a struggle — so much so that some residents pine for the days of Taliban rule.

“During the Taliban, we had city power and security. That was the best time,” said Sultan Mohammad, who sat in near-darkness inside his shop, unable to keep his soft drinks cold. “This is the worst time we’ve ever faced, without electricity.”

‘The Taliban was born here’

Local officials, as well as U.S. government investigators probing waste in American-funded projects, worry that insurgents could feed off the despair and gain more recruits, erasing hard-fought gains in security. Or jobless people could turn to crime or work in the opium fields, bolstering the narcotics trade and undermining another key U.S. goal.

“If the security in Kandahar becomes bad, it will impact all of Afghanistan,” said Sayed Rasoul, the regional director of the government’s power utility, known by its acronym DABS. “The Taliban was born here. All of Afghanistan’s revolutions started from here.”

The last time Kandahar, the country’s second-largest city, had round-the-clock electricity was in the 1970s.

Back then it was a backwater, despite being the focus of the ethnic Pashtun homeland of the nation’s kings and ruling tribes. Under Taliban rule, when the population was a lot smaller, residents received electricity most of the day, generated by the Kajaki Dam, built in the 1950s by American engineers in neighboring Helmand province.

After the Islamists’ ouster in 2001, Kandahar’s population boomed. Massive American contracts caused the economy to grow. The need for electricity soared.

By 2011, Helmand province was a nexus of the fighting, and electricity from the Kajaki Dam was frequently cut. Even so, the dam was providing only 33 megawatts of power on peaceful days. The electricity was shared by several localities, with roughly a third of it going to Kandahar, said officials from DABS.

That year, U.S military commanders and aid officials identified the provision of electricity to Kandahar as a top counterinsurgency objective, hoping it would generate confidence in the government’s ability to provide basic services and lessen support for the Taliban.

The U.S. military initially spent $143.5 million to build two diesel power-generating plants, then after 2011 an additional $139.6 million to provide fuel and maintain them. And USAID, the American government’s aid arm, provided $24.4 million to build smaller generators at one site and rehabilitate some more at another.

A city of generators

At its peak, the project brought power, mostly for businesses, to roughly half the city, but never round-the-clock. The rest of the population still heavily depended on the Kajaki Dam.

Since last June, though, the U.S. military has gradually reduced the fuel supply each month. The sites are now able to provide only one week’s worth of electricity per month, and none of it goes to the city’s residents, local utility officials said. In September, the funding is scheduled to end, and U.S. military officials say there is no plan to renew the project, raising concerns about how the city and its businesses will receive electricity afterward.

On a recent day, the city had received no electricity from the dam for the previous two months because of intense clashes between Taliban and Afghan security forces.

“It was a waste of money to build these generator plants,” said Sayed Jan Khakrezwal, the head of the provincial council. “It was like placing clay over water to cross it.”

Kandahar is now a city of generators. They hum in factories, shops and government buildings. Some are as big as cars, powering entire shopping complexes. In poorer enclaves, streets are dark, the houses and shops lighted as they were in the 19th century.

In the past six weeks, the ­Etehad Bottling Co. has spent $11,000 for generator fuel. A year ago, when the U.S. generators provided most of the power, it cost a few hundred dollars a month. Last year, the company ran two shifts a day, employing 155 workers. Now there’s one, and 35 employees have been let go.

“We cannot compete in the market,” said Sayed Ahmad Sameh, Etehad Bottling’s manager, citing power shortages as the main reason.

To be sure, not all the economic downsizing is purely electricity-related. As most U.S. forces have departed, so have lucrative military contracts and aid.

But if the electricity situation gets worse, the bottling company plans to cut another 30 to 40 jobs.

The last time Abdul Qayum, an employee, was jobless, he worked in fields where opium poppies are grown.

“If I lose my job, I will return to the poppy fields,” he said.

‘Free energy, green energy’

Senior local government and national utility officials said in interviews that they urged American military and aid officials to provide a more sustainable source of energy months before the decision was taken to pursue the generator option.

“There were other permanent alternatives — wind, hydro or charcoal energy,” said Tooryalai Wesa, governor of Kandahar province. “With that kind of money spent, we could have had a very stable solar-powered system.”

Col. Allan L. Webster, joint engineering director for U.S. Forces Afghanistan, acknowledged that Afghan officials urged the consideration of more durable options. But large-scale power projects take “significant time and resources to complete,” he said.

Webster defended the fuel-supply initiative as a “bridging solution” that would “temporarily increase power until a permanent solution is achieved.”

In January 2011, months before the fuel-supply project began, a report commissioned by the U.S. Army Corps of Engineers determined that a local dam — the Dahla Dam — could be rehabilitated to provide hydropower to Kandahar.

The projected cost was roughly $40 million, 14 percent of the cost of the fuel subsidies. The potential power it would generate was 22 megawatts a day, slightly more than the two U.S. Army generator sites, and it was sustainable. In the past four years, the Dahla Dam area has never been a fighting zone.

“This is free energy, green energy,” said Rasoul, the regional DABS director, adding that it would have taken a year to build the hydropower plant. “But nothing was ever done.”

But Webster said the Army felt Kandahar had two better options to bring additional electricity: installing a third turbine at the ­Kajaki Dam and building a transmission line to connect the nation’s southern and northern electricity grids.

Today, those two projects — together costing U.S. taxpayers about $745 million — are several years from completion.

The U.S. government is now considering spending millions more on a proposal local officials made before 2011: a solar power plant. But the electricity from the plant will be nowhere near enough to meet the city’s needs.

There is still no permanent solution. Since the reductions in the U.S. fuel supply, the Afghan government has been unable to fill the gap. U.S. military commanders and aid officials had expected DABS to increase prices for electricity, which is heavily subsidized, to pay for fuel and timely repairs. But DABS officials said they fear price hikes would breed resentment and harm businesses even more.

“It has to be a big jump in price,” said Mirwais Alami, the commercial director for DABS. “The people will find it hard to accept it.

“Honestly, we don’t know what to do with Kandahar,” he said.

Read more:

The last time I saw Kandahar, it was a remote Taliban bastion. How that’s changed.

Foreign fighters are spilling into Afghanistan, helping the Taliban

Afghanistan’s defining fight: technocrats vs. strongmen