Over the past decade, Turkey and Brazil have been widely celebrated as star economic performers—emerging markets with increasing influence on the international stage. Yet, over the past three months, both countries have been paralyzed by massive demonstrations expressing deep discontent with their governments' performance. What is going on here, and will more countries experience similar upheavals?

The theme that connects recent events in Turkey and Brazil to each other, as well as to the 2011 Arab Spring and continuing protests in China, is the rise of a new global middle class. Everywhere it has emerged, a modern middle class causes political ferment, but only rarely has it been able, on its own, to bring about lasting political change. Nothing we have seen lately in the streets of Istanbul or Rio de Janeiro suggests that these cases will be an exception.

In Turkey and Brazil, as in Tunisia and Egypt before them, political protest has been led not by the poor but by young people with higher-than-average levels of education and income. They are technology-savvy and use social media like Facebook and Twitter to broadcast information and organize demonstrations. Even when they live in countries that hold regular democratic elections, they feel alienated from the ruling political elite.

TURKEY JUNE 22, 2013 | A protester holds a flag in Taksim Square in Istanbul.A European Pressphoto Agency

TUNISIA FEB. 25, 2011 | Tunisians rally to demand the resignation of the interim government. European Pressphoto Agency

EGYPT JUNE 28, 2013 | Egyptians opposing President Morsi hold placards reading 'Leave.' European Pressphoto Agency

In the case of Turkey, they object to Prime Minister Recep Tayyip Erdoğan's development-at-all-cost policies and authoritarian manner. In Brazil, they object to an entrenched and highly corrupt political elite that has showcased glamour projects like the World Cup and Rio Olympics while failing to provide basic services like health and education to the general public. For them, it is not enough that Brazil's president, Dilma Rousseff, was herself a left-wing activist jailed by the military regime during the 1970s and leader of the progressive Brazilian Workers Party. In their eyes, that party itself has been sucked into the maw of the corrupt "system," as revealed by a recent vote-buying scandal, and is now part of the problem of ineffective and unresponsive government.

The business world has been buzzing about the rising "global middle class" for at least a decade. A 2008 Goldman Sachs report defined this group as those with incomes between $6,000 and $30,000 a year and predicted that it would grow by some two billion people by 2030. A 2012 report by the European Union Institute for Security Studies, using a broader definition of middle class, predicted that the number of people in that category would grow from 1.8 billion in 2009 to 3.2 billion in 2020 and 4.9 billion in 2030 (out of a projected global population of 8.3 billion). The bulk of this growth will occur in Asia, particularly China and India. But every region of the world will participate in the trend, including Africa, which the African Development Bank estimates already has a middle class of more than 300 million people.

Corporations are salivating at the prospect of this emerging middle class because it represents a vast pool of new consumers. Economists and business analysts tend to define middle-class status simply in monetary terms, labeling people as middle class if they fall within the middle of the income distribution for their countries, or else surpass some absolute level of consumption that raises a family above the subsistence level of the poor.

But middle-class status is better defined by education, occupation and the ownership of assets, which are far more consequential in predicting political behavior. Any number of cross-national studies, including recent Pew surveys and data from the World Values Survey at the University of Michigan, show that higher education levels correlate with people's assigning a higher value to democracy, individual freedom and tolerance for alternative lifestyles. Middle-class people want not just security for their families but choices and opportunities for themselves. Those who have completed high school or have some years of university education are far more likely to be aware of events in other parts of the world and to be connected to people of a similar social class abroad through technology.

Families who have durable assets like a house or apartment have a much greater stake in politics, since these are things that the government could take away from them. Since the middle classes tend to be the ones who pay taxes, they have a direct interest in making government accountable. Most importantly, newly arrived members of the middle class are more likely to be spurred to action by what the late political scientist Samuel Huntington called "the gap": that is, the failure of society to meet their rapidly rising expectations for economic and social advancement. While the poor struggle to survive from day to day, disappointed middle-class people are much more likely to engage in political activism to get their way.

This dynamic was evident in the Arab Spring, where regime-changing uprisings were led by tens of thousands of relatively well-educated young people. Both Tunisia and Egypt had produced large numbers of college graduates over the past generation. But the authoritarian governments of Zine El Abidine Ben Ali and Hosni Mubarak were classic crony-capitalist regimes, in which economic opportunities depended heavily on political connections. Neither country, in any event, had grown fast enough economically to provide jobs for ever-larger cohorts of young people. The result was political revolution.

None of this is a new phenomenon. The French, Bolshevik and Chinese Revolutions were all led by discontented middle-class individuals, even if their ultimate course was later affected by peasants, workers and the poor. The 1848 "Springtime of Peoples" saw virtually the whole European continent erupt in revolution, a direct product of the European middle classes' growth over the previous decades.

While protests, uprisings and occasionally revolutions are typically led by newly arrived members of the middle class, the latter rarely succeed on their own in bringing about long-term political change. This is because the middle class seldom represents more than a minority of the society in developing countries and is itself internally divided. Unless they can form a coalition with other parts of society, their movements seldom produce enduring political change.

Thus the young protesters in Tunis or in Cairo's Tahrir Square, having brought about the fall of their respective dictators, failed to follow up by organizing political parties that were capable of contesting nationwide elections. Students in particular are clueless about how to reach out to peasants and the working class to create a broad political coalition. By contrast, the Islamist parties—Ennahda in Tunisia and the Muslim Brotherhood in Egypt—had a social base in the rural population. Through years of political persecution, they had become adept at organizing their less-educated followers. The result was their triumph in the first elections held after the fall of the authoritarian regimes.

A similar fate potentially awaits the protesters in Turkey. Prime Minister Erdoğan remains popular outside of the country's urban areas and has not hesitated to mobilize members of his own Justice and Development Party (AKP) to confront his opponents. Turkey's middle class, moreover, is itself divided. That country's remarkable economic growth over the past decade has been fueled in large measure by a new, pious and highly entrepreneurial middle class that has strongly supported Erdoğan's AKP.

This social group works hard and saves its money. It exhibits many of the same virtues that the sociologist Max Weber associated with Puritan Christianity in early modern Europe, which he claimed was the basis for capitalist development there. The urban protesters in Turkey, by contrast, remain more secular and connected to the modernist values of their peers in Europe and America. Not only does this group face tough repression from a prime minister with authoritarian instincts, it faces the same difficulties in forging linkages with other social classes that have bedeviled similar movements in Russia, Ukraine and elsewhere.

The situation in Brazil is rather different. The protesters there will not face tough repression from President Rousseff's administration. Rather, the challenge will be avoiding co-optation over the long term by the system's entrenched and corrupt incumbents. Middle-class status does not mean that an individual will automatically support democracy or clean government. Indeed, a large part of Brazil's older middle class was employed by the state sector, where it was dependent on patronage politics and state control of the economy. Middle classes there, and in Asian countries like Thailand and China, have thrown their support behind authoritarian governments when it seemed like that was the best means of securing their economic futures.

Brazil's recent economic growth has produced a different and more entrepreneurial middle class rooted in the private sector. But this group could follow its economic self-interest in either of two directions. On the one hand, the entrepreneurial minority could serve as the basis of a middle-class coalition that seeks to reform the Brazilian political system as a whole, pushing to hold corrupt politicians accountable and to change the rules that make client-based politics possible. This is what happened in the U.S. during the Progressive Era, when a broad middle-class mobilization succeeded in rallying support for civil-service reform and an end to the 19th-century patronage system. Alternatively, members of the urban middle class could dissipate their energies in distractions like identity politics or get bought off individually by a system that offers great rewards to people who learn to play the insiders' game.

Brazil's recent economic growth has produced an entrepreneurial middle class. Above,aprotest in Rio de Janeiro on June 20. REUTERS

There is no guarantee that Brazil will follow the reformist path in the wake of the protests. Much will depend on leadership. President Rousseff has a tremendous opportunity to use the uprisings as an occasion to launch a much more ambitious systemic reform. Up to now she has been very cautious in how far she was willing to push against the old system, constrained by the limitations of her own party and political coalition. But just as the 1881 assassination of President James A. Garfield by a disappointed office-seeker became the occasion for wide-ranging clean-government reforms in the U.S., so too could Brazil use the occasion of the protests to shift onto a very different course today.

The global economic growth that has taken place since the 1970s—with a quadrupling of global economic output—has reshuffled the social deck around the world. The middle classes in the so-called "emerging market" countries are larger, richer, better educated and more technologically connected than ever before.

This has huge implications for China, whose middle-class population now numbers in the hundreds of millions and constitutes perhaps a third of the total. These are the people who communicate by Sina Weibo—the Chinese Twitter—and have grown accustomed to exposing and complaining about the arrogance and duplicity of the government and Party elite. They want a freer society, though it is not clear they necessarily want one-person, one-vote democracy in the near term.

This group will come under particular stress in the coming decade as China struggles to move from middle- to high-income status. Economic growth rates have already started to slow over the past two years and will inevitably revert to a more modest level as the country's economy matures. The industrial job machine that the regime has created since 1978 will no longer serve the aspirations of this population. It is already the case that China produces some six million to seven million new college graduates each year, whose job prospects are dimmer than those of their working-class parents. If ever there was a threatening gap between rapidly rising expectations and a disappointing reality, it will emerge in China over the next few years, with vast implications for the country's stability.

There, as in other parts of the developing world, the rise of a new middle class underlies the phenomenon described by Moises Naím of the Carnegie Endowment as the "end of power." The middle classes have been on the front lines of opposition to abuses of power, whether by authoritarian or democratic regimes. The challenge for them is to turn their protest movements into durable political change, expressed in the form of new institutions and policies. In Latin America, Chile has been a star performer with regard to economic growth and the effectiveness of its democratic political system. Nonetheless, recent years have seen an explosion of protests by high-school students who have pointed to the failings of the country's public education system.

The new middle class is not just a challenge for authoritarian regimes or new democracies. No established democracy should believe it can rest on its laurels, simply because it holds elections and has leaders who do well in opinion polls. The technologically empowered middle class will be highly demanding of their politicians across the board.

The U.S. and Europe are experiencing sluggish growth and persistently high unemployment, which for young people in countries like Spain reaches 50%. In the rich world, the older generation also has failed the young by bequeathing them crushing debts. No politician in the U.S. or Europe should look down complacently on the events unfolding in the streets of Istanbul and São Paulo. It would be a grave mistake to think, "It can't happen here."

—Mr. Fukuyama is a senior fellow at Stanford University's Freeman Spogli Institute for International Studies and the author of "The Origins of Political Order: From Prehuman Times to the French Revolution."