When officials in Madrid slashed support for alternative-energy programs this year as part of the campaign of government austerity sweeping Europe, ripples quickly hit this rural town with the cancellation of plans for a solar energy plant.

The decision forced several dozen layoffs at the company that would have built and run the project, adding to an unemployment rate that is running at 30 percent in the region. The move also undercut hopes at local firms that had expected to provide heavy equipment and fencing for the plant. At a cement company that was to supply material for the project, mixers now sit idle and the fear of further layoffs looms.

The economic debate consuming Europe comes down to the question of whether struggling countries should choose austerity by clamping down on government spending to rein in unsustainable deficits or pursue growth stimulated by more spending.

Spain is wrestling with the problem facing much of the region: how to tame the deficits that have fueled Europe’s debt crisis without undermining vital growth. The euro zone’s tilt toward austerity has contributed to an economic slowdown that is itself making it harder for governments to balance their budgets.

Public anger over the tough medicine is reshaping the continent’s politics, most recently upending the government of French President Nicolas Sarkozy and chasing from power Greece’s two largest parties, which had agreed to severe austerity measures in return for an international bailout.

The tensions between tackling runaway deficits and stimulating the economy are in many ways akin to those facing the United States, where political leaders are struggling to agree on the right balance. And with the U.S. recovery still fragile, Washington policymakers are watching Europe closely, worried that an escalating crisis there could knock the economy off track over here.

So far, Spain’s handling of these difficult choices has failed to restore confidence. Instead of winning support from international investors and attracting fresh investment, the austerity program has produced bitter fruit: recession, spiking unemployment and little faith that either growth or control of public debt are within reach. With investors still skeptical about Spain’s financial health, the government has to pay about 6 percent interest to borrow money. That rate is too expensive to be sustainable because it will boost the government’s obligations to a level that would be hard to pay off, setting up a deadly debt spiral and forcing Spain to raise interest rates yet higher if it is to convince anyone to lend it more money.

Officials in the current Spanish government, elected in December by a historic margin on promises to bring government budgets into line and revive the economy, are sticking to their guns.

A day after tens of thousands of Spaniards took to the streets to protest the government’s economic policies, Prime Minister Mariano Rajoy on Sunday defended the austerity measures as crucial for pulling the country out of crisis.

“We are doing what is needed and that means taking difficult decisions,” said Rajoy as quoted by the Associated Press. “There are decisions that we don’t like, but I can tell you that we will continue to take the decisions necessary to see Spain through this situation.”

At the Ministry of Economy and Competitiveness, where offices are decorated with art on loan from the Prado museum, the logic is considered airtight: If Spain shows it can control its public accounts, then confidence and the economy will rebound. If not, it will become a casualty of Europe’s financial storm.

Along with deep cuts in many federal ministry projects, such as the alternative-energy initiative, the government has raised the income tax and put strict limits on regional budgets that are expected in coming months to affect funding for schools and health care.

“We want to convince markets that we are fully committed to policies that will make Spain sustainable,” a top ministry official said. “The imbalances in this economy are very deep.”

Pockets of success

Some parts of the Spanish economy are doing well. A pair of major Spanish banks have spun profits out of the boom in Latin America, despite hard times in Europe. Transport firms are winning bids in the United States and elsewhere. Exports have been a bright spot.

Pharmaceutical companies, for instance, have turned domestic research into international sales. Eduardo Sanchiz, chief executive of Barcelona-based Almirall, said his firm’s laboratories are continuing to expand, churning out such products as a new treatment for chronic obstructive pulmonary disease that is under review by regulators in Europe and the U.S.

But in Alburquerque, in the land of conquistadors such as Pizarro and de Soto, there is a sense of shrinking opportunities as decisions in Madrid and Brussels, the seat of European government, trickle down and hopes for reviving the beleaguered local economy vanish.

“It is a chain reaction,” said Jose Lopez-Montenegro, owner of the local Horpebi cement plant, set among the oak trees, sheep pastures and orchards that surround this hilltop village of 5,700. Puffing on a cigarette near the yellow mixing tower, he said he’ll be fortunate if he can avoid cutting his workforce, which has already shrunk from 18 to 12 because of a sharp downturn in Spanish construction.

Local officials here, 200 miles from Madrid near the border with Portugal, say the proposed project by the NaturEner solar company was expected to create a total of about 1,000 construction jobs over the next two years.

The local slate business remains depressed because of the downturn in construction.

Hog farming, an important local industry, has also crashed with the rise of more productive farms in other parts of the country. And fewer hogs means less feed to sell.

That makes for a double blow for Jose Luis Rasero Perez, owner of a combined feed and fencing store. He had hoped to install the fences that would ring the fields of solar panels planned for the Alburquerque countryside. This project would have created 20 jobs for two years, he said.

“I support the government, but this is affecting my business, my people, my town. We all have to make sacrifices, but this is going too far,” Perez said.

Mayor Angel Espino, who spends his days protesting and lobbying the government in Madrid, describes a town struggling to stay afloat. He and other local officials talk of relatives having to move in together, of residents relying on government benefits or seeking part-time work on nearby farms to qualify for the year-round stipend that the Spanish government offers seasonal workers as a way to help rural communities.

Skyrocketing unemployment

Spain has often had bouts of unemployment in excess of 20 percent. But the most recent data, which showed the unemployment rate nearing 25 percent and higher in places such as Extremadura, Alburquerque’s region, surprised labor economists because of the acceleration of job losses and the spike in the number of households without anyone employed.

Jobless benefits in 2011 were estimated at perhaps 3 percent of the entire Spanish economy, said Gayle Allard, a labor expert at the IE Business School in Madrid. By contrast, the United States has been spending less than 1 percent of the nation’s economic output on unemployment benefits.

Recent changes to the labor law were expected to smooth out the dramatic peaks and valleys of the country’s employment cycles by giving companies more freedom from national labor contracts to set wages and work hours at levels that business owners deem sustainable. But for now, she said, these changes probably mean continued job losses as businesses take advantage of the more flexible rules to fire workers.

In Madrid, instructors on the sprawling campus of the Colegio Salesiano Santo Domingo Savio try to keep their students optimistic. The college offers four-month certificates in skilled trades, as well as two-year programs in telecommunications and industrial machine operation. The school’s Madrid branch currently places 50 percent of its graduates in jobs. But figures for the building trades are half that, and in some regions of the country virtually no one gets employed, school officials said.

Marcelino Ramos, 50, who teaches a course in electrical wiring, acknowledged that Spain faces a challenge in competing with other countries such as China. “That’s globalization,” Ramos said, surrounded in his classroom by solar panels, computers and model wind turbines. His job of 26 years evaporated two years ago when the German auto-parts maker he worked for relocated to China.

The depth of Spain’s problems has begun to register with European officials. They recently told the country it could have an extra year to comply with a euro-region requirement that governments limit their annual budget deficit to 3 percent of national economic output. Spain still intends to hit that target next year.

The International Monetary Fund also said recently that Spain was among the countries that could move more slowly on deficit control. Its overall debt is among the lowest in the euro zone, but investors have punished the country for its poor economic growth and concerns that local banks might need a large bailout. There are also doubts about how soon Spain might be able to get its economy back on a sound footing.

Juan Jose Mayo was laid off from his job as a maintenance worker at Green Future, the company that was to manage the solar project in Alburquerque. He is collecting unemployment benefits, and his family also relies on part-time jobs that his two adult daughters hold in the nearby town of Badajoz.

Mayo said he might never find another job.

“I put together a CV. They just ask how old I am,” he said as he played with his pack of Chesterfield cigarettes at a local pub. “In Spain there is no work for 50-year-olds.”