Eva Maria Gonzales realised the Netherlands might not be the paragon of fair play it is held up to be when she was accidentally sent a trove of state documents showing a tax ministry “blacklist” of families wrongly accused of benefit fraud.

The Spanish born lawyer, who was raised in the Netherlands, went on to defend the families successfully, exposing a scandal that shook the country, caused the government to resign at the start of this year and, alongside a series of other recent missteps, tarnished the country’s self-image of good governance and accountability.

“This didn’t feel like the Netherlands, where everything is meant to be transparent and well run,” Gonzales said of the scandal. “It was the first time I realised there were two worlds at play.”

The country’s persistent reputation for fair play has helped successive governments act as guardians of probity in the EU — as when prime minister Mark Rutte demanded last year that countries such as Italy and Spain fix their dysfunctional state administrations in return for billions of euros of help from the EU’s Covid-19 recovery fund.

But, at home, that Dutch reputation for integrity has been shaken. Rutte, now a caretaker prime minister, has called the benefits scandal, where the tax ministry singled out tens of thousands of families often on the basis of their ethnic background, a “colossal stain”.

Critics say that its root cause lies in the frugal spending and technocratic efficiency that the Netherlands advocates abroad but which at home has led to a decade-long hollowing out of the state that hobbled the country’s ability to deal with the pandemic.

Zihni Ozdil, a historian and former green left MP, said the benefits affair exposed a “cognitive dissonance” among the Dutch ruling class. “We have cultivated a self-image of being a transparent and rule of law abiding country. But when the facts do not correspond to reality, people do not seem to change their views,” he said.

The government has suffered a series of embarrassments over its handling of the pandemic. It was slower than its EU neighbours to roll out the vaccine, despite its advanced healthcare system.

The health ministry in particular has come under fire over a €100m procurement contract for face masks with a company set up by a political commentator with ties to the Christian Democrat party (CDA) that runs the ministry.

Sywert van Lienden, the pundit, and two co-founders made nearly €20m from the arrangement despite marketing themselves as a non-profit organisation. Van Lienden apologised and last week resigned from the CDA.

Joost Sneller, an MP for the liberal democrat D66 party, said the pandemic “stress test” showed that most arms of the state were under-equipped and underprepared.

He attributed the shortcomings to the dismantling of the state that began in the aftermath of the 2008 financial crisis. “Rutte’s first government in 2010 was defined by the Reaganite philosophy of keeping the state so small you can drown it in a bathtub,” Sneller said.

The Netherlands ranks 20th out of 27 in the EU on the proportion of expenditure spent on central government, according to the European Commission. It also ranks eighth in Transparency International’s corruption perceptions index, a lofty position just below Norway and Sweden.

Dutch officials add that there has also been a marked shift by Rutte’s liberal party over the past year, which now promises to expand the government’s role and responsibilities.

Nevertheless, the benefits scandal has been partly blamed on an obsession with government efficiency. From 2004, the Dutch state entrusted its tax ministry to handle benefits claims using semi-automatic systems run largely by algorithms.

These helped enable racial profiling where families of largely Moroccan, Turkish and Dutch Antilles origin were targeted, according to the national data protection authority.

“There has been an enduring belief in automation and efficiency to such an extent that a government run by algorithm ends up with institutional racism in a largely white country”, said Wim Voermans, a professor of constitutional law at Leiden University.

Furthermore, subsequent attempts by civil servants to cover up their mistakes reveal a culture of technocratic impunity that has become commonplace over the last decades, added Voermans. The scandal’s latest revelations last week showed that tax officials tried to suppress internal dissent from civil servants who raised alarm.

Voermans attributed this sense of impunity to the famous “Polder” consensus culture that has dominated Dutch society in the postwar era and has since extended to politics. It is defined by opaque dealmaking between the executive and interest groups such as trade unions and industry — with parliament consigned to a marginal role.

At the apex of the system is Rutte. Opponents have disparagingly dubbed his preference for informal cabinet meetings and his claims to have little knowledge or memory of a string of recent scandals the “Rutte doctrine”.

Rutte remains popular, however, and is on course to lead a record-breaking fourth coalition government.

Sneller, the MP, said parliamentarians have struggled to hold the executive to account because the multiplicity of parties has left them without staff or resources to cope. A record 17 parties entered the 150-seat lower house of parliament earlier this year.

For historian Ozdil, consensus politics is also generating a dangerous counter-reaction and risks feeding the resentment of a populist far-right, which rails against a “cartel” of mainstream parties. Extreme right populist parties won a combined 28 parliamentary seats in elections in March.

“Europe should be worried about what is happening in the Netherlands”, he said.