The first complete treatment for hepatitis C that requires taking only a once-a-day pill won approval Friday from the Food and Drug Administration.

The drug, called Harvoni from Gilead Sciences, could shorten the duration of treatment and provide the first all-oral regimen for many patients.

The new drug also appears to be a bit less expensive for some patients than Gilead’s existing blockbuster hepatitis C drug, Sovaldi, which has become the poster child for those complaining that the cost of medicines is out of control.

Sovaldi costs $1,000 a pill, or $84,000 for a typical 12-week course of treatment, but it must be used with other drugs. Harvoni is even more expensive at $1,125 a pill, or $94,500 for a 12-week course of treatment. But that is roughly in line with the total cost for Sovaldi and the drugs used with it. Many patients will be able to take Harvoni for only eight weeks, at a cost of about $63,000.