W HEN GRAPES are ready for harvest, Mendoza, capital of the Argentine province that shares its name, throws a party. For three days this month revellers on vine-themed floats tossed grapes and melons into crowds. Gauchos paraded. Argentina’s “harvest queen” took her crown at an open-air show.

The bacchanal was a contrast to national gloom. Argentina’s GDP contracted by 6.2% in the year to the fourth quarter of 2018 (see article). The urban unemployment rate is 9% and inflation this year is expected to be 40%. Mendoza appears to be doing better. Income data for 2018 are not yet in but the provincial unemployment rate is only 5.9%. A devaluation of the peso has helped boost wine sales, tourism and trade with next-door Chile.

Another reason for Mendoza’s prosperity, claims the province’s governor, Alfredo Cornejo, is that it is well governed. “Argentina has been a sick economy for so long,” he says. “We want to be an example.”

Mr Cornejo has carried out in the province the sort of policies that Argentina’s president, Mauricio Macri, a political ally, has been trying to enact at the national level. But the governor, who, unlike Mr Macri, can count on a majority in the legislature, has had more success. Mr Cornejo inherited a big budget deficit when he took office in 2015. Unlike the president, he dealt with it swiftly. Mendoza balanced its budget by 2017 and had a surplus last year. It plans for another one in 2019.

The process was painful. Mr Cornejo’s government cut 8,000 out of 103,000 state jobs. He slimmed down the number of ministries from 14 to eight. Senior officials, including the governor, cut their own salaries by 20%, which helped damp down opposition. “We’ve been confronting a culture—for example, politicians giving people jobs to guarantee votes—and that’s tough,” Mr Cornejo says.

Instead, he has tried to win voters over by providing better public services. The government repaved a third of the province’s 17,000km (11,000 miles) of roads, expanded sewerage and improved access to clean drinking water, which still does not reach all households. Mr Cornejo tied teachers’ pay rises to their showing up to work. That enraged them. The government ignored “all the rules of bargaining with its workers”, fumed Sebastián Henríquez, a union leader. But absenteeism fell sharply. Unlike in many other provinces, where schools were shut down by strikes, Mendoza’s opened on time last month.

Mr Cornejo, who leads Argentina’s centrist Radical Civic Union, says the roots of his unradical politics lie in his childhood. Growing up in the Uco valley, a rural part of Mendoza, he saw how privately owned vineyards brought prosperity.

He is encouraging enterprise in other sectors. In 2018 Mendoza passed a law allowing Uber to offer its taxi service. In Buenos Aires, the country’s capital, taxi-drivers have staged violent protests against Uber. The Cornejo administration introduced a legal framework for public-private partnerships to build infrastructure, chiefly roads, though Argentina’s high interest rates have kept them on hold.

Last year Mr Cornejo allowed fracking in Malargüe, Mendoza’s portion of the Vaca Muerta energy reserve, which is thought to have the world’s second-largest deposits of shale gas. That provoked resistance elsewhere in the province.

Argentina’s mess puts limits on Mendoza’s prosperity. Economic uncertainty makes investors wary. “Mendoza may be the hopeful exception, but it’s almost impossible to separate it from a country still facing so many issues,” says Marc Ricart, of Exagon Partners, a startup investment firm that focuses on South America’s southern cone. Mr Macri, who was forced to seek a $57bn loan from the IMF , is battling both to enact austerity and to win re-election in a contest due on October 27th.

Mr Cornejo’s legacy looks more secure. Mendoza’s constitution bars him from serving consecutive terms as governor. But his political heir, Rodolfo Suarez, the mayor of the provincial capital, is expected to win the gubernatorial election scheduled for September. With luck, Mendoza will continue to lead by example.