Higher education is one of the great successes of the welfare state. What was once the privilege of a few has become a middle-class entitlement, thanks mainly to government support. Some 3.5 million Americans and 5 million Europeans will graduate this summer. In the emerging world universities are booming: China has added nearly 30 million places in 20 years.

Yet the business model has changed little since Aristotle taught at the Athenian Lyceum: Young students still gather at an appointed time and place to listen to the wisdom of scholars.

Now a revolution has begun, thanks to three forces: rising costs, changing demand and disruptive technology. The result will be the reinvention of the university.

Higher education suffers from Baumol's disease — the tendency of costs to soar in labor-intensive sectors with stagnant productivity. Whereas the prices of cars, computers and much else have fallen dramatically, universities, protected by public-sector funding and the premium employers place on degrees, have been able to charge ever more for the same service. For two decades, the cost of going to college in America has risen by 1.6 percentage points more than inflation every year.

For most students university remains a great deal; by one count, the boost to lifetime income from obtaining a college degree, in net-present-value terms, is as much as $590,000. But for an increasing number of students who have gone deep into debt — especially the 47 percent in America and 28 percent in Britain who do not complete their degrees — it is plainly not value for money. And the state's willingness to pick up the slack is declining. In the United States, government funding per student fell by 27 percent between 2007 and 2012, while average tuition fees, adjusted for inflation, rose by 20 percent. In Britain, tuition fees, close to zero two decades ago, can reach $15,000 a year.

The second driver of change is the labor market. In the standard model of higher education, people go to college in their 20s and a degree is an entry ticket to the professional classes. But automation is beginning to have the same effect on white-collar jobs as it has had on blue-collar ones. According to a study from Oxford University, 47 percent of occupations are at risk of being automated in the next few decades. As innovation wipes out some jobs and changes others, people will need to top up their human capital throughout their lives.

By themselves, these two forces would be pushing change. A third — technology — ensures it.

The Internet — which has turned businesses from newspapers to music to book retailing upside down — will also upend higher education. Now the MOOC, or "massive open online course," is offering students the chance to listen to star lecturers and get a degree for a fraction of the cost of attending a university.

MOOCs started in 2008; and, as often happens with disruptive technologies, they have so far failed to live up to their promise. Largely because there is no formal system of accreditation, dropout rates have been high. But this is changing as private investors and existing universities are drawn in.

One provider, Coursera, claims more than 8 million registered users. Though its courses are free, it bagged its first $1 million in revenues last year after introducing the option to pay a fee of between $30 and $100 to have course results certified. Another, Udacity, has teamed up with AT&T and Georgia Tech to offer an online master's degree in computing, at less than a third of the cost of the traditional version. Harvard Business School will soon offer an online "pre-MBA" for $1,500. Starbucks has offered to help pay for its staff to earn online degrees through Arizona State University.

MOOCs will disrupt different universities in different ways. Not all will suffer. Oxford and Harvard could benefit. Ambitious people will always want to go to the best universities to meet each other, and the digital economy tends to favor a few large operators. The big names will be able to sell their MOOCs around the world.

But mediocre universities may suffer the fate of many newspapers. Were the market for higher education to perform in the future as that for newspapers has done over the past decade or two, universities' revenues would fall by more than half, employment in the industry would drop by nearly 30 percent and more than 700 institutions would shut their doors. The rest would need to reinvent themselves to survive.

Like all revolutions, the one taking place in higher education will have victims. Many towns and cities rely on universities. In some ways MOOCs will reinforce inequality both among students (the talented will be much more comfortable than the weaker outside the structured university environment) and among teachers (superstar lecturers will earn a fortune, to the fury of their less-charismatic colleagues).

Politicians will inevitably come under pressure to halt this revolution. They should remember that state spending should benefit society as a whole, not protect tenured professors from competition. The reinvention of universities will benefit many more people than it hurts.

Students in the rich world will have access to higher education at lower cost and greater convenience. MOOCs' flexibility appeals to older people who need retraining: edX, another provider, says that the median age of its online students in the United States is 31. In the emerging world, online courses also offer a way for countries like Brazil to leapfrog Western ones and supply higher education much more cheaply. And education has now become a global market: the Massachusetts Institute of Technology discovered Battushig Myanganbayar, a remarkably talented Mongolian teenager, through an online electronics course.

Rather than propping up the old model, governments should make the new one work better. They can do so by backing common standards for accreditation. In Brazil, for instance, students completing courses take a government-run exam. In most Western countries, it likewise would make sense to have a single, independent organization that certifies exams.

Reinventing an ancient institution will not be easy. But it does promise better education for many more people. Rarely have need and opportunity so neatly come together.

Copyright 2013 The Economist Newspaper Limited, London. All Rights Reserved. Reprinted with permission.