THE Japanese spend half as much on health care as do Americans, but still they live longer. Many give credit to their cheap and universal health insurance system, called kaihoken, which celebrates its 50th anniversary this year. Its virtues are legion. Japanese people see doctors twice as often as Europeans and take more life-prolonging and life-enhancing drugs. Rather than being pushed roughly out of hospital beds, they stay three times as long as the rich-world average. Life expectancy has risen from 52 in 1945 to 83 today. The country boasts one of the lowest infant-mortality rates in the world. Yet Japanese health-care costs are a mere 8.5% of GDP.

Even so, the country's medical system is embattled. Although it needs a growing workforce to pay the bills, Japan is ageing and its population is shrinking. Since kaihoken was established in 1961, the proportion of people over 65 has quadrupled, to 23%; by 2050 it will be two-fifths of a population that will have fallen by 30m, to under 100m. “The Japanese health system that had worked in the past has begun to fail,” Kenji Shibuya of the University of Tokyo and other experts write in a new issue of the Lancet, a British medical journal, devoted to kaihoken. “The system's inefficiencies could be tolerated in a period of high growth, but not in today's climate of economic stagnation.”

By 2035 health care's share of GDP will roughly double, according to McKinsey, a consultancy. The burden falls on the state, which foots two-thirds of the bills. Politicians are unwilling to raise taxes, so they squeeze suppliers instead: more than three-quarters of public hospitals operate at a loss.

Like other service industries in Japan, there are cumbersome rules, too many small players and few incentives to improve. Doctors are too few—one-third less than the rich-world average, relative to the population—because of state quotas. Shortages of doctors are severe in rural areas and in certain specialities, such as surgery, paediatrics and obstetrics. The latter two shortages are blamed on the country's low birth rate, but practitioners say that they really arise because income is partly determined by numbers of tests and drugs prescribed, and there are fewer of these for children and pregnant women. Doctors are worked to the bone for relatively low pay (around $125,000 a year at mid-career). One doctor in his 30s says he works more than 100 hours a week. “How can I find time to do research? Write an article? Check back on patients?” he asks.

On the positive side, patients can nearly always see a doctor within a day. But they must often wait hours for a three-minute consultation. Complicated cases get too little attention. The Japanese are only a quarter as likely as the Americans or French to suffer a heart attack, but twice as likely to die if they do.

Some doctors see as many as 100 patients a day. Because their salaries are low, they tend to overprescribe tests and drugs. (Clinics often own their own pharmacies.) They also earn money, hotel-like, by keeping patients in bed. Simple surgery that in the West would involve no overnight stay, such as a hernia operation, entails a five-day hospital stay in Japan.

Emergency care is often poor. In lesser cities it is not uncommon for ambulances to cruise the streets calling a succession of emergency rooms to find one that can cram in a patient. In a few cases people have died because of this. One reason for a shortage of emergency care is an abundance of small clinics instead of big hospitals. Doctors prefer them because they can work less and earn more.

The system is slow to adopt cutting-edge (and therefore costly) treatments. New drugs are approved faster in Indonesia or Turkey, according to the OECD. Few data are collected on how patients respond to treatments. As the Lancet says, prices are heavily regulated but quality is not. This will make it hard for Japan to make medical tourism a pillar of future economic growth, as the government plans.

The Japanese are justly proud of their health-care system. People get good basic care and are never bankrupted by medical bills. But kaihoken cannot take all the credit for the longevity of a people who eat less and stay trimmer than the citizens of any other rich country. And without deep cost-cutting and reform, the system will struggle to cope with the coming incredible shrinking of Japan.