New drugs to treat hepatitis C are tremendously effective — and tremendously costly — raising fears that the high prices might outstrip the ability of public and private insurers to pay. Fortunately, competitive market forces and hard-nosed bargaining by insurers for big discounts are going a long way toward resolving the problem.

The drugs are sorely needed. The hepatitis C virus caused nearly 20,000 deaths in the U.S. in 2013, many in patients who were also infected with HIV, the human immunodeficiency virus that causes AIDS, a double whammy that triples their risk of liver disease.

There are four new drugs approved to treat hepatitis C: Sovaldi and Harvoni, made by Gilead Sciences; Viekira Pak, made by AbbVie, and Daklinza, made by Bristol-Myers Squibb. The cost for Sovaldi is $84,000 for a standard 12-week course of treatment, which breaks down to about $1,000 for each pill, taken daily. State Medicaid programs typically obtain discounts, but prices still generally exceed $600 a pill. Harvoni is even more expensive, with a list price of about $95,000 for a 12-week course of treatment without a discount.

The benefits of these new drugs are undeniable. They can essentially cure the infection in eight to 24 weeks. Older medications are not nearly as effective and often produce disabling side effects. Curing the patient decreases by more than 80 percent the risk of liver cancer, liver failure and the need for a liver transplant, thus saving money in the long run. Successful treatment can also greatly reduce the number of new cases of hepatitis C by preventing transmission of the virus through needle-sharing among drug addicts infected with HIV.

Unfortunately, most state Medicaid programs, in an effort to control costs, have placed restrictions on making the drugs widely available. A June 9 letter to President Obama from the Presidential Advisory Council on HIV/AIDS called for eliminating such "unreasonable" restrictions. It said that increased competition had "dramatically reduced" the cost of treatment.

Even so, there is probably room to drive prices down even further. With these and other high-priced drugs, the manufacturers typically charge what the market will bear. The public and private insurers that pay for hepatitis C drugs should press for even bigger discounts.

FROM AN EDITORIAL IN THE NEW YORK TIMES