This was the news the government had been waiting for.

"Spain's labor market has made a 180-degree turn," crowed the prime minister, Mariano Rajoy, as the country announced the first annual rise in employment in six years. The numbers show that unpopular reforms to the malfunctioning labor market are starting to work. But there is plenty left to do.

In the past year Spain has created 190,000 jobs. The unemployment rate, still one of the highest in the eurozone, fell from 26 percent to 24.5 percent, and the labor force stopped shrinking after six straight quarters of decline.

The labor reform in 2012 gave companies more flexibility to set wages and working conditions themselves rather than through sector-wide bargaining, and cut severance payments for unfair dismissals. Those changes, buttressed by a deal between unions and employers, tempered wage growth that had far outstripped gains in productivity.

How much credit do they deserve for the upturn in employment?

The answer may determine the political fate of Rajoy, who defied street protests to push reform through and faces a general election by the end of next year. The opposition Socialist Party claims that the number of unemployed has risen by more than 600,000 since Rajoy took office in 2011, despite the reforms. Pedro Sanchez, the party's new secretary-general, promises to repeal them if it regains power.

That would be a mistake. Other factors contributed to the jobs recovery, especially the "whatever it takes" pledge by the European Central Bank two years ago to save the euro. But reform played an important role, says Rafael Domenech, an economist at BBVA, a bank. One piece of evidence is that Spain is creating jobs at lower rates of GDP growth than before. In previous cycles, employment rose when growth hit 2 percent. This time the gain came during a year when GDP expanded by just 1.2 percent.

To make a serious dent in unemployment, however, Spain will need to be more ambitious. Without further changes, the jobless rate will not dip below 20 percent until 2019, according to the IMF. The structural unemployment rate — the level reached when the economy is working at capacity — is 18 percent, triple that of the United States.

One problem is that many small companies (with 10 workers or fewer) have not benefited from greater flexibility. That is because the process of opting out of sector-wide agreements can be cumbersome. Such opt-outs could be made easier.

Another is that nearly a quarter of workers are still on temporary contracts. This is damaging, because they are much less productive than those with permanent jobs and employers do not invest in them. One way to encourage firms to hire permanent workers would be to cut severance payments to the levels of other European countries.

Nor has much been done for the 3.5 million people who have been jobless for more than a year, said Marcel Jansen of Madrid's Autónoma University. Many are poorly educated: Spain has one of the highest school dropout rates in the OECD. Those with qualifications often find that they are not the ones employers want.

The answers, said Jansen, include spending more on retraining and overhauling state-run employment offices, which do a poor job of matching workers' skills with local employers' needs. The government has tightened rules for people receiving unemployment benefits to encourage them to look for work or to take training courses. But they need to be effectively enforced.

The government could lower the cost of hiring workers by cutting social-security contributions, which are high by European standards. A rise in value-added tax could pay for that. Others advocate lowering the minimum wage for unskilled workers.

Rajoy says he will not let up on reform until Spain's unemployment plague becomes merely a "sad" episode in history. He has started talks with unions and employers on a package of job-friendly measures, to be hammered out after the summer break. But with elections looming, few expect it to be bold.

John Oslund • 612-673-7206

Copyright 2013 The Economist Newspaper Limited, London. All Rights Reserved. Reprinted with permission.