Both India and China are in the middle of their worst economic slowdowns in many years. If IMF projections for 2012 prove accurate, China’s GDP will advance at the slowest pace since 1999, and India’s at the slowest pace since 2002. There is a lot to learn from these downturns. One is that economies, no matter how promising, can’t grow at fantastically high rates indefinitely, with GDP ascending in neat, upward straight lines. We also learn that “decoupling” is still not a reality (especially for China). Despite rising domestic demand and burgeoning ties of trade and investment between emerging economies, the developing world is still connected to the developed, and what happens in the U.S. and Europe still matters a great deal.

Perhaps the most important takeaway from the slowdown, however, is that even rapidly growing economies can’t be complacent. Though it is true that the poor performance of emerging economies everywhere is a function of the weakness of the global economy generally, that is only part of the story. Both India and China have been slowing down because neither country has done what they need to keep growth going, in a healthy and sustainable fashion.

The big question going forward is: Will they?

The answer matters to everybody. If India and China get their reforms right, the world economy will be better able to create jobs. These two markets are becoming crucial to major companies in the U.S. and Europe. Yum! Brands, which controls the KFC and Pizza Hut fast-food chains, now earns roughly half its revenue in China, for example. If India and China don’t move ahead on reform, the global economy will lose out on a key source of growth that is vital as the U.S. and Europe struggle with debt, deficits and unemployment.

In many respects, the sort of reform necessary in the two economies is similar. Both require greater liberalization. India must continue to dismantle the leftover red tape of the License Raj to free up private companies and open up to greater levels of foreign investment. China has to scale back its overbearing state enterprises, allow more competition in certain key sectors (like finance) and deregulate prices (especially interest rates) to improve efficiency, corporate performance, and resource allocation. Both also have to do more to build a stronger middle class. In China, that means improving labor rights and creating a better social safety net (such as improved healthcare and pension systems). India has to double down on anti-poverty programs by improving the effectiveness of the civil service and bolstering education and other social services. Both have to stamp down corruption. China ranks an unimpressive 75th (out of 183 countries) on Transparency International’s Corruption Perceptions Index, and India an embarrassing 95th. Recent scandals, like the fall of Chongqing boss Bo Xilai in China, have exposed just how serious the corruption problem is.

Yet neither country has been responding to their reform challenges boldly enough. Both administrations face stiff political opposition to reform. In India, there are too many politicians still stuck in 1960s thinking about economics who fiercely resist the realities of reform and make it difficult for the government to press forward with any urgency. China, too, has powerful opponents to greater reform, especially state enterprises, who benefit from subsidies and protected markets, and the bureaucracy, which will resist any loss of authority in liberalization efforts. There is also no clear consensus within the Chinese Communist Party as to what kind of economy China should have going forward, with some factions arguing for greater openness and other fearful of giving up too much state control.

Despite the opposition, however, both countries have been making progress. After a long stall in reform, India’s new finance minister, P. Chidambaram, has unleashed a torrent of measures in recent weeks that further opened the retail, airline and insurance sectors to foreign investment. I’ve been impressed recently with China’s economic policymaking amid the downturn. Rather than deluging the economy with another tidal wave of credit and spending (as the state did during the 2008 economic crisis), the government has been much more prudent, encouraging further lending and fast-tracking some infrastructure projects but not going overboard. This has boosted hopes that the leadership if finally committing itself to “rebalancing,” or shifting the sources of growth away from investment and towards consumption. There are early signs that difficult shift is starting to take place. In the first three-quarters of the year, consumption contributed more to growth than investment.

We should not, however, get our hopes up. The Indian government has recently picked some low-hanging reform fruit but the tough stuff remains ahead. India can no longer afford to suffer without proper power or rural development because of a resistant and ineffective bureaucracy. New Delhi’s biggest challenge is making the state more competent and capable of implementing reform.

China’s leaders say the right things – outgoing President Hu Jintao spoke of fighting corruption and boosting consumption in his speech before this month’s 18th Communist Party Congress – but we’ve heard these promises again and again and again and real progress has been slow, at best. The new party leadership announced on Thursday also leaves doubts that reforms will come quickly enough. Prominent reformers, most notably Guangdong provincial party chief Wang Yang, were left off the new seven-member Standing Committee. Yet China may have an even bigger reform challenge than India. New Delhi needs to continue and expand what it has been doing for the past 20 years – freeing India’s entrepreneurial energies through liberalization. China, however, has the tough task of completely altering its growth model, from a state-led, investment-heavy system to a more open and balanced system with stronger rule of law. Despite the recent promising data, that process is still in its early days.

Neither country can afford to foot-drag. If India can’t get its growth rate up, the country won’t be able to rapidly reduce poverty or create jobs for the millions of youngsters who enter the workforce each year. China’s current growth model, meanwhile, is creating dangerous distortions in the economy – excess capacity, high levels of debt – that could eventually explode into a major economic crisis. The big story in India and China in the next five years is whether or not they can get their reform act together. We should all pray they do.