President Lyndon Johnson signs legislation creating the Medicare and Medicaid programs on July 30, 1965. (Associated Press)

It was exactly 50 years ago this week that President Lyndon B. Johnson flew to Independence, Mo., and, with former president Harry Truman at his side, signed into law the legislation creating Medicare and Medicaid. It was a seminal moment in U.S. political history.

For three decades, liberals and conservatives had warred over government health insurance. “Medicare was a deeply divisive issue,” said Yale University political scientist Theodore Marmor in an interview. Until 1965, a coalition of Republicans, conservative Democrats and the American Medical Association — which attacked what it called “socialized medicine” — had prevailed. In 1935, President Franklin D. Roosevelt had omitted health insurance from the Social Security legislation for fear that AMA opposition would doom the entire bill. In the late 1940s, Truman pressed unsuccessfully for national insurance. Little changed in the ’50s and early ’60s.

Conventional wisdom assigns much of the credit for turning things around to Johnson’s mastery of congressional politics. What actually turned things around was his landslide victory over Barry Goldwater (61 percent to 39 percent ), which created a popular mandate and gave Johnson huge working majorities in both the House and Senate. Said Marmor: “The [conservative] coalition’s ability to oppose was shattered by the election of ’64.”

The result has unquestionably been a colossal triumph of social policy. Together, Medicare and Medicaid provide health insurance for 111 million people, reports the Kaiser Family Foundation. That’s 55 million for Medicare (insurance for the aged) and 66 million for Medicaid (the joint federal-state insurance for the poor). (Note: These figures include 10 million “dual eligibles” who are enrolled in both programs; the total doesn’t count them twice.) In 2013, Medicare and Medicaid cost $1.049 trillion, almost 40 percent of the $2.8 trillion in U.S. health spending.

Fear of medical bankruptcy has faded; access to health services has increased. “These programs are part of the social fabric,” says James Capretta, associate director of the Office of Management and Budget under President George W. Bush. “People depend on them.” Popular support is broad. In a new Kaiser poll, three-quarters of respondents judged Medicare “very important,” as did nearly two-thirds for Medicaid.

But the triumph is tarnished and incomplete. Even as Johnson and Wilbur Mills, then chairman of the House Ways and Means Committee, outmaneuvered their opponents, they spawned long-term problems for the medical system, as health-care scholar Paul Starr of Princeton University argues in a recent essay.

The 1965 legislation, he writes, “created two moral frameworks” for coverage — superior for the elderly, inferior for the poor. Medicare benefits were (and are) uniform and considered sacrosanct. By contrast, Medicaid benefits vary state to state, and reimbursement rates are often so low that many doctors have “refused to take Medicaid patients.”

Costs were another problem. To soften resistance from doctors and hospitals, the legislation “failed to impose any cost restraint on health-care providers.” Doctors would receive their “customary” fees; hospitals could charge whatever they estimated their costs to be. “A surer way of promoting healthcare inflation could not have been devised,” writes Starr. Although these permissive policies were later scrapped, the underlying fee-for-service system — which pays providers for performing more services — survived.

Finally, the health-care system is hideously complex, making it more costly and obscure. Not only does Medicaid differ among states, but also Medicare comes in many pieces (Parts A, B, C and D). Although some are financed through payroll taxes, most get their money from general tax revenues. Hospital fees are reimbursed according to DRGs (“diagnosis-related groups”) and doctors by RBRVS (“resource-based relative value scale” payments). Probably not one American in 50,000 understands them. Their manifold complications tempt providers to game or defraud the system.

The ultimate significance of what happened in 1965 is that it gave government the major role in overseeing the health-care system, now nearly a fifth of the economy. It has been an uneasy — and unsuccessful — stewardship. Health care is intensely personal, but all those personal decisions have enormous collective consequences for the nation. It has been hard for politicians (or most Americans) to grapple with both realities. Although everyone wants to control health spending, no one wants to deny care to any individual. The debate over the Affordable Care Act highlighted our difficulty in discussing health care.

The recent slowdown in health spending is good news. But it’s not clear what caused it or how long it will last. An aging population with higher costs suggests caution. By 2030, the number of Medicare beneficiaries is projected to reach 81 million, an almost 50 percent increase from today. Meanwhile, higher health spending has squeezed other programs. That’s an ironic footnote for the triumph of ’65: By threatening the rest of government, the instruments of a liberal agenda — Medicare and Medicaid — have bred illiberal consequences.

Read more from Robert Samuelson’s archive.