Ever since deregulation caused a worldwide economic meltdown in September '08 and everyone became a Keynesian again, it hasn't been easy to be a fanatical follower of the late economist Milton Friedman. So widely discredited is his brand of free-market fundamentalism that his admirers have become increasingly desperate to claim ideological victories, however far fetched.

A particularly distasteful case in point. Just two days after Chile was struck by a devastating earthquake, Wall Street Journal columnist Bret Stephens informed his readers that Milton Friedman's "spirit was surely hovering protectively over Chile" because, "thanks largely to him, the country has endured a tragedy that elsewhere would have been an apocalypse … It's not by chance that Chileans were living in houses of brick – and Haitians in houses of straw –when the wolf arrived to try to blow them down."

According to Stephens, the radical free-market policies prescribed to Chilean dictator Augusto Pinochet by Milton Friedman and his infamous "Chicago Boys" are the reason Chile is a prosperous nation with "some of the world's strictest building codes."

There is one rather large problem with this theory: Chile's modern seismic building code, drafted to resist earthquakes, was adopted in 1972. That year is enormously significant because it was one year before Pinochet seized power in a bloody US-backed coup. That means that if one person deserves credit for the law, it is not Friedman, or Pinochet, but Salvador Allende, Chile's democratically elected socialist president. (In truth many Chileans deserve credit, since the laws were a response to a history of quakes, and the first law was adopted in the 1930s).

It does seem significant, however, that the law was enacted even in the midst of a crippling economic embargo ("make the economy scream" Richard Nixon famously growled after Allende won the 1970 elections). The code was later updated in the 90s, well after Pinochet and the Chicago Boys were finally out of power and democracy was restored.

Little wonder: as Paul Krugman points out, Friedman was ambivalent about building codes, seeing them as yet another infringement on capitalist freedom.

As for the argument that Friedmanite policies are the reason Chileans live in "houses of brick" instead of "straw", it's clear that Stephens knows nothing of pre-coup Chile. The Chile of the 1960s had the best health and education systems on the continent, as well as a vibrant industrial sector and a rapidly expanding middle class. Chileans believed in their state, which is why they elected Allende to take the project even further.

After the coup and the death of Allende, Pinochet and his Chicago Boys did their best to dismantle Chile's public sphere, auctioning off state enterprises and slashing financial and trade regulations. Enormous wealth was created in this period but at a terrible cost: by the early 80s, Pinochet's Friedman-prescribed policies had caused rapid de-industrialisation, a tenfold increase in unemployment and an explosion of distinctly unstable shantytowns. They also led to a crisis of corruption and debt so severe that, in 1982, Pinochet was forced to fire his key Chicago Boy advisers and nationalise several of the large deregulated financial institutions. (Sound familiar?)

Fortunately, the Chicago Boys did not manage to undo everything Allende accomplished. The national copper company, Codelco, remained in state hands, pumping wealth into public coffers and preventing the Chicago Boys from tanking Chile's economy completely. They also never got around to trashing Allende's tough building code, an ideological oversight for which we should all be grateful.

Thanks to CEPR for tracking down the origins of Chile's building code.