As the trapped Chilean miners are being pulled, one by one, from their months' long captivity 2000 feet below the earth's surface, it is worth appreciating the great international, multi-institutional effort required to achieve this favorable outcome to what might have been a great tragedy. What initially started as a combined market and government failure ended well because of the combined efforts of market actors, government agecies, and private organizations.
Mining is an inherently dangerous activity, perhaps more so in Chile than in many other places. Indeed, the miners who worked in the very Chilean mine that collapsed were paid what economists call a "risk premium" of 30% over the prevailing wage and were referred to locally as "kamikazes" (see here). Debates continue as to whether the company that owned the mine took adequate precautions to protect its workers, and whether the Chilean government regulated the mine sufficiently to compensate for the lack of market incentives to protect miners.
What is undeniable and most impressive, however, is the massive, well-coordinated, and (so far) well-executed rescue attempt, involving various agencies of Chile's government, Chile's domestic mining industry, information from mine safety and rescue experts the world over, and even NASA, which was able to offer useful advise on keeping the miners alive and well in an small, enclosed space with no natural light over a lengthy period of time.
The happy ending of this ordeal for the 33 trapped miners is down to the ability and coordinated actions of a large number of individuals (including, not least, the brave miners themselves) and organizations - including both market and governmental organizations - working toward a common goal. This should temper, if only modestly and temporarily, our usual skepticism about the ability of humans - and especially the governments they create - to solve real problems.