When I went in for my annual physical in 2011, I knew something was up when the physician's assistant who usually dealt with me deferred to the actual doctor. It was up to him to take on more serious issues, and as he soon explained, I had one. My blood work had come back showing I was infected with the hepatitis C virus. Hep C is a serious, life-threatening illness that attacks the liver and can result in fatty liver, cirrhotic liver and liver cancer. One out of five people carrying the hep C virus will die of liver disease within 20 years. And a lot of people have it—at least 3 million, and perhaps as many as 7 million, in the United States alone.

When I was diagnosed five years ago, there was no effective cure. The interferon-based treatments weren't successful half the time, and the side effects were so debilitating few patients could endure the months-long punishing protocol. But hope was on the horizon. Pharmaceutical companies were working frantically to create new hep C drugs that were more effective, with fewer nasty side effects. Gilead Science was first out the gate, bringing the new hep C drugs Harvoni and Sovaldi to market in 2014 and 2015, respectively. And they worked great: More than 90 percent of patients taking the new drugs saw the hep C virus wiped out in three months, and without the side effects that made interferon treatments so intolerable.

But there was one big problem: Gilead wants $1,000 a pill for the 12-week treatment, or $84,000 for Harvoni and only slightly less for Sovaldi. In the United States, there is nothing stopping pharmaceutical companies from charging whatever they think the market will bear. Martin Skreli, the infamous "Pharma Bro," may be the poster child for pharmaceutical price-gouging, but the executives at Gilead certainly deserve at least a (dis)honorable mention. Gilead has grown fat off of hep C drug profits, generating billions in sales each quarter and sitting on a $26 billion pile of cash at the end of last year, with hepatitis C sufferers, insurance companies and state Medicaid plains generating the wealth of Croesus for the company.

For me, as for millions of others, buying the pills was financially out of the question. My Affordable Care Act insurance plan would, for a time, cover the treatment—but only if my liver were already diseased. In other words, I had to let the disease progress to the point that it actually threatened my life before the insurance company would pay to treat the disease. (Just last month, under pressure from the state government, seven New York state insurance companies agreed to cover the drugs for all hepatitis C patients, not just those with advanced liver disease.)

There was another problem: Because I had a low-premium, high-deductible health insurance plan, even if my insurance company paid for the drugs, I still faced $6,000 in out-of-pocket costs. But that was something of a moot point, since my insurance company required I wait for my liver to be damaged before it would pay a cent. So there I was, infected with a potentially life-threatening virus, but unable to afford the drugs that could cure it. It was not a happy place to be, and I was determined to find a solution. It came from India.

Last year, Gilead entered into an agreement with India that would allow Indian pharmaceutical manufacturers to produce generic versions of Harvoni and Sovaldi and sell them in 101 developing countries at "a significantly reduced flat price." The medicines are urgently needed in those countries, where an estimated 103 million people have the hep C virus.

I did some internet sleuthing, found that Harvoni from Indian pharmaceutical house Natco is sold as Hepcinat LP, and quickly discovered dozens of online vendors ready, willing and eager to sell it to me. I made my inquiries in the heady days of rollout last fall and got price quotes ranging from $500 to $2,500. I eventually decided to go with a company called Care Exim, which offered the pills for $1,500. (The cost is significantly lower now. In searches I made while writing this, some quotes were around $500 for the complete course of treatment. Care Exim now says it can provide Hepcinat for $1,050 for the full course of treatment.)

It felt kind of sketchy, however. I was dealing with unknown online drug purveyors based on the other side of the planet. They didn't take credit cards—payment took the form of a bank transfer—and didn't require a prescription. They were happy to ship to the United States even though doing so violated U.S. customs regulations and they were quick with assurances that it would get through with "no problem." Was it a scam? Was I buying counterfeit drugs? Those were the questions I weighed, balanced against the possibility of being cured at a cost I could (barely) afford.

I paid my money and I took my chances. The package arrived in nine days, untouched by customs. There were indeed three bottles of pills labeled as Hepcinat LP manufactured by Natco, with seals and even a folded paper insert with all the drug information on it. I took the pills for 83 days (saving one for possible testing just in case), waited a couple of weeks, then went to my doctor and had my blood drawn. The following week, he reported that my hepatitis C viral load was now zero. I was cured.

I'm quite pleased about that, but the whole experience leaves me feeling rather bilious about the U.S. health-care system in general and the role of privately owned pharmaceutical companies in particular. I had health insurance, yet it proved useless. Hell, I could have flown to India and stayed for three months and taken the pills for less than what it would have cost me to get Harvoni through my insurance company, if it would cover it at all, if I waited for my liver to be damaged first.

And then there's Gilead. It didn't even develop Harvoni itself; it made a business decision to pay $11 billion to buy the company that did so it could be first to market and reap the rewards, $26 billion worth. There is something obscene about that. A billion-dollar profit would have been a very respectable return on investment, but Gilead is getting much, much more than that, and all the rest of us are paying for it, one way or another, whether through higher insurance premiums, higher Medicaid costs, or like me, out of their own pockets, just so Gilead's stockholders can see their dividends double. If you buy Hepcinat from India, Gilead still makes a profit as part of its licensing arrangement, but it doesn't make the unholy profits the U.S. government allows it to get away with. And you save thousands of dollars, and you get cured of hepatitis C.