The cost of doxycycline, an antibiotic routinely prescribed for treatment of Lyme disease, has skyrocketed in recent months, causing consternation among Island medical and veterinary providers as well as health care consumers who foot the bills.

The retail price of doxycycline increased from about three cents per pill, to more than $5 per pill over the past 18 months, according to local doctors and pharmacists. The generic antibiotic is prescribed to some 1,500 patients on Martha’s Vineyard each year and is the first choice among doctors to treat most tick-borne illnesses.

The dramatic cost increase has angered health care professionals and patients. In some cases, it caused doctors to change the way they treat their patients.

Formerly three cents a pill, now more than $5 per pill. — Mark Lovewell

While there are indications recently that the price may be coming down, there are only a few manufacturers producing the generic medication at this time. That leaves the Island vulnerable to future shortages and subject to the profit goals of a few companies that exert an outsized influence on the market for doxycycline.

In late 2013, a three-week course of treatment (two 100-milligram tablets per day), cost $10 to $20 at Island pharmacies. By the summer of last year, that prescription cost $210 to $250, and remains at that level according to those familiar with the local market. Even those covered by prescription insurance were hit by price hikes, as insurers reclassified the drug to a higher cost tier and charged higher co-pays.

According to a U.S. House committee investigating price hikes in several generic drugs, the average wholesale price of 500 tablets in October 2013 was $20. Seven months later, the average wholesale price for the same amount was $1,849, an increase of more than 8,000 per cent.

“Somebody’s taking advantage of the need,” said Dr. Gerald Yukevich, who treats hundreds of Lyme disease patients at the Vineyard Medical Care clinic in Vineyard Haven. “On the front lines of the disease, it’s an outrageous development. Somebody in the pharmaceutical industry is taking advantage of a lot of suffering people, and they should be brought to justice.”

According to industry experts, doxycycline is the subject of an unintended effect of legislation that created the generic drug industry. When a drug company develops a safe and effective medication, the Food and Drug Administration grants approval. The drug is patented, and the company has the exclusive right to sell the medication for 20 years, to recover the cost of innovation and development, and make a profit.

When the patent expires, other companies can enter the market, making exact copies of the brand-name drug that are tested and proved equally effective, usually at a lower cost. The FDA estimates generic drugs save consumers $8 billion to $10 billion each year.

Doxycyline is a well-established medication, the first choice for most doctors treating Lyme disease as well as other bacterial infections. It is safe, effective and inexpensive to manufacture. Once more than 20 companies made the generic drug. That created fierce competition. Now there are only three or four manufacturers.

Over the years many companies dropped out of the market to focus on more profitable drugs. A wave of pharmaceutical mergers has also changed the economic landscape. Shortages can be caused by any number of unforeseen circumstances. Regulatory action can force companies to temporarily stop production of drugs. Raw materials are subject to their own shortages and price increases. In one case, damage from Hurricane Sandy forced a manufacturer to stop making doxycycline.

The supply side of the supply-and-demand equation contracted quickly in recent years. That created what economists call a market failure. Instead of fostering competition that benefits consumers, the market created a situation where shortages, or profit motives, can overcome competition and spark extreme price increases.

David Caron, director of pharmacy at the Martha’s Vineyard Hospital, stopped short of labeling the recent astronomical cost increases price gouging.

Generic antibiotic is prescribed to some 5,000 Island patients every year. — Mark Lovewell

“It’s a dangerous word to use, but just like any other company in the marketplace, when they see an opportunity, they are going to get the most bang for their buck,” he said. “It’s really unfortunate.”

In the spring of 2014, pharmacists began to experience a shortage of doxycycline from wholesalers.

“The supply became very limited,” said Tamara Hersh, owner and pharmacist at Conroy Apothecary in West Tisbury and Oak Bluffs. “We were kind of scrambling around trying to find a supplier. Because of our unique location, and the amount of people who have Lyme disease, we were very nervous going into the summer.”

When they could get the drug, local pharmacists tried to stockpile supplies, and managed to keep enough doxycycline in stock.

The dramatic price increase also affected the treatment of animals on the Island. Dr. David Tuminaro, who treats all kinds of animals in his mobile veterinary practice Caring for Animals, said the cost of doxycycline sometimes prompted him to prescribe alternative medications.

“It did change some of our thought process,” the veterinarian said. Before the price hikes, he would sometimes prescribe a one-week trial dose of doxycycline for a dog that had previously tested positive for Lyme disease, but he stopped the practice because of the expense.

The cost issues were far more acute in large animals, especially because most animal owners do not have prescription drug insurance and must pay full retail price.

“It’s weight dependent,” he said of the antibiotic. “A 60-pound dog is getting three [100 milligram] tablets a day. An average horse was getting 17 to 18 tablets, three times a day. The expense of that was immense.”

Dr. Tuminaro said in one case, a client took a horse diagnosed with Lyme disease off-Island to be hospitalized for intravenous treatment with an alternative antibiotic. The cost of five days of treatment in an equine hospital was less expensive than a three-week course of doxycycline tablets.

Still, he was reluctant call it price gouging.

“It seems to be the price is decreasing again,” Dr. Tuminaro said. “To me, that shows not price gouging, but supply and demand. They are catching up with the amount needed. I like to look at the glass half full.”

Joshua Cohen, director of the Tufts Center for the Study of Drug Development, and an authority on health economics, said the market for generic drugs often works well to benefit consumers, but when it doesn’t, it creates a chain effect throughout the health care system. At the end of that chain are sicker patients.

“When it doesn’t work well, in a few instances, it has negative effects on the patient, on providers, on the system as a whole,” Mr. Cohen said. “Insurance companies will pay for it, but they will raise the premiums of beneficiaries and increase co-payment. For those patients who can’t afford it, on a fixed income, Medicare, Medicaid, they have poorer outcomes. That’s my concern.”

The federal government has limited authority to step into private markets, even when they fail. Except in the case of drugs that are needed by active troops, or in some cases Veterans Administration patients, it is rare that government intervenes to make sure supplies are adequate. Federal authorities do have some ability to make distribution of drugs more efficient.

“It would be important that [doxycycline] is distributed to clinics on the Vineyard, instead of all the drugs going to Boston,” Mr. Cohen said. “Sometimes you have that situation, where the drugs are available in one area, and not in another. The government does have some limited power in that situation.”