The child is well-known in the halls where state bureaucrats oversee health care for millions of Californians — not by name, but by a number: $21 million.

His medications alone cost state taxpayers that much in a single year. The boy was California’s most expensive Medicaid patient in recent years. His case was singled out by the state’s top health care official to highlight the public insurance program’s extraordinary obligations as a backstop for low-income patients.

How can a single child’s treatment cost that much? He has hemophilia and needs large quantities of a pricey drug — known as clotting factor.

Hemophilia drugs are among the most costly drugs in the nation, and taxpayers foot the bill for many patients on Medicaid who could never afford them on their own. It highlights the complexity and secrecy of drug pricing and helps explain the burgeoning cost of Medicaid.

Medications for hemophilia are crucial to patients with the rare genetic condition that prevents clotting and puts them at great risk of bleeding to death. There is no question that the drugs save lives, and officials are not arguing that they should be withheld. “It’s a highly vulnerable population,” said Ken Kizer, a veteran health administrator. “If anyone has seen a hemophiliac in crisis, you’re not going to say no.”

But drugmakers profit handsomely, competing vigorously for the limited number of patients. The U.S. hemophilia market, which serves about 20,000 patients, is worth $4.6 billion a year, said AllianceBernstein, a research and investment firm.

Nationwide, a third of patients with hemophilia are covered by Medicaid. And the program’s three most expensive drugs per prescription are for hemophilia, said an analysis by the Kaiser Family Foundation. In 2015, Medicaid paid about $353 million for prescriptions of Advate, the most commonly prescribed blood-clotting medication a 273 percent increase from 2011.

The California boy whose drugs cost $21 million in a single year was an extreme case, and his identity has not been disclosed. Still, medications to treat hemophilia on average cost more than $270,000 annually per patient, according to a 2015 Express Scripts report, and they can easily soar past $1 million annually.

Colleen Tuite’s son Kevin, 7, has severe hemophilia with a complication known as an inhibitor — an antibody that makes his regular blood-factor infusions less effective. Inhibitors can increase the cost of care.

Because he has been a foster child before being adopted by the Tuites, Kevin qualifies for Medi-Cal, California’s version of Medicaid, until he is 26. The family also has private health insurance, which pays for about half of Kevin’s medical bills. These can run upward of $200,000 per month, Tuite said.

Caitlin Carroll, director of public affairs for PhRMA, the pharmaceutical industry lobbying group, said high development costs and a complicated manufacturing process play a role in pricing.

State health officials say they are struggling against forces they are nearly powerless to change. “There aren’t a lot of options available to Medicaid programs in terms of controlling costs, because we don’t set the initial costs,” said Deborah Weston, pharmacy program manager for Oregon’s Medicaid program.