A drug that can cure hepatitis C was one of the top pharmaceutical costs in most states' Medicaid budgets in 2014.

All told, 33 states spent more than $1 billion to treat the disease with Gilead Sciences' Sovaldi, according to data released Tuesday by Sens. Charles Grassley, R-Iowa, and Ron Wyden, D-Ore. Still, the money spent was enough to treat only 2.4 percent of Medicaid patients infected with the virus.

New York spent the most by far. That state's Medicaid program shelled out more than $360 million for Sovaldi to treat about 4,000 of its nearly 60,000 Medicaid recipients who have hepatitis C.

Pennsylvania was next, spending $98 million last year to treat 1,059 Medicaid recipients with hepatitis C. Another 30,000 Pennsylvanians are infected, the data show.

In a letter to the senators, Pennsylvania's secretary of human services said the state was suffering from "sticker shock" and said the price affected the state's decision about whether to treat patients with the hepatitis drug.

"Treatment guidelines recommended prioritizing treatment for the 'sickest' patients due to potential costs and access issues," said Secretary Theodore Dallas in the letter.

Many states also spent smaller amounts on Harvoni, Gilead's other hepatitis drug, which was approved near the end of 2014.

When Sovaldi was approved in December 2013, it was the first drug that could effectively cure hepatitis C, a virus that attacks the liver and can lead to cirrhosis, cancer and the need for a transplant.

The Centers for Disease Control and Prevention estimated that 2.7 million people in the U.S. had chronic hepatitis C infections in 2013.

Sovaldi became the center of controversy when Gilead set the price at $1,000 a pill, or $84,000 for a course of treatment. Harvoni is even pricier.

In early December, Grassley and Wyden released a report from an 18-month investigation showing that Gilead was fully aware its pricing strategy would be controversial, but decided to stick with it to maximize revenue.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.