Among economists, it is an article of faith that competition lowers prices. But when it comes to prescription drugs, the ordinary rules do not apply. According to a new study, competition not only fails to reduce drug prices, it may drive them higher.

Using data supplied by Blue Cross Blue Shield, researchers studied the prices of 49 widely used brand-name drugs over six years. They then focused on 17 drugs that had direct therapeutic equivalents—i.e., competing brand-name drugs that treat the same medical condition. For example, Humalog, Humulin, and Novolog are all forms of insulin used to treat diabetes. Competition should have caused the prices of these 17 drugs to rise more slowly than those of the remaining drugs.

In fact, the median prices of the 17 drugs with therapeutic equivalents grew slightly faster than those of the 32 drugs that did not face competition, although the difference was not statistically significant. Not only that, but the price hikes for the therapeutically equivalent drugs “were highly synchronized” and were “some of the largest cost increases” observed in the study.

We first noticed this phenomenon—synchronized price hikes for competing drugs—when studying the prices of Viagra, Cialis and Levitra, which are treatments for erectile dysfunction. In theory, Viagra’s price should have fallen when Cialis hit the market, and prices for both drugs should have declined further when Levitra became available.

That did not happen. Instead, over many years, the prices of all three drugs rose in lockstep. Instead of seeking to gain market share by cutting prices, the pharma companies played “follow the leader.” When one charged more, the others did too. Because of the products involved, we named the phenomenon “erectile pricing.” The new study shows that erectile pricing is not limited to ED drugs.

Competition works to lower prices in the rest of the economy, so why doesn’t it pressure pharma companies to sell brand-name drugs for less? One reason is that the number of sellers is small, making it easy for drug makers to coordinate. They need only mimic each other’s price changes until they all learn to “follow the leader.”

Insurance coverage compounds the problem by insulating consumers from high prices and making enormous amounts of money available to pay for drugs. When copays are fixed, consumers have no incentive to use less expensive drugs, and manufacturers cannot gain market share by charging less. And manufacturers can raise prices because Medicare, Medicaid, and private insurers will pay pretty much whatever they ask. Simply stated, when patients use insurance to pay for drugs, prices go up.

The solution to this problem can be found in the very same drug stores that sell overpriced prescription drugs. Drug stores also sell thousands of cheap over-the-counter medicines such as aspirin, cough syrup and hydrocortisone. Because consumers pay for these items themselves, their prices are both transparent and reasonable. When consumers start buying prescription drugs directly, their prices will be transparent and reasonable too.

The fundamental problem is that existing arrangements, which include coverage requirements imposed by the Affordable Care Act, heavily subsidized premiums for Medicare, tax exemptions for dollars spent on employer-provided health insurance, and zero out-of-pocket contributions by Medicaid recipients, encourage people to use insurance in the wrong way. Why pay for drugs with post-tax dollars when one can purchase them with pre-tax dollars by buying insurance through one’s employer? Why pay for drugs directly when premiums for Medicare Part D are priced at only 25 percent of the program’s cost? Existing arrangements encourage people to maintain comprehensive (rather than catastrophic) insurance coverage — which drives up the cost of everything.

A more sensible arrangement would encourage consumers to pay for most drugs directly and reserve health care coverage for true catastrophes. Insurance works best when it covers disastrous events that rarely occur, such as house fires..

Replacing existing arrangements with more sensible ones will require dramatic tax, entitlement and insurance reforms. We don’t expect those changes to happen any time soon, but as premium hikes and the rising cost of Medicare and Medicaid make comprehensive coverage less and less affordable, something will have to give. If that “something” includes a shift from insurance to direct purchasing by consumers, competition will help bring drug prices under control.