I believe the IMF forced them to live within their means. Its the only way any economy will work in the long run. If you spend more than you make you will go broke whether you're an individual or a country. It seems that we just spent 700 billion that we don't really have.
RunningFool is right. I seem to remember that the IMF, in exchange for a certain amount of forgiveness of debt by other countries owed money, forced them to adopt austerity measures. Times were probably pretty lean for the population for another decade or so, but these two countries have really been taking off this decade. In the long run, the finances of a country are not that much different than those of a family unit - you can live "high on the hog" for a few years by taking on debt, but at some point, the debt must be paid or if it is too high, you face bankruptcy.