While sharp overnight increases in the cost of prescription drugs have recently dominated headlines, critics say another pharmaceutical industry practice that has added billions of dollars to the price that consumers pay for their medicines continues unabated.

Known as "reverse settlement payments," or "pay-to-delay" deals, the financial arrangements are a unique but common practice in the pharmaceutical industry. Essentially, they allow drug manufacturers in some instances to pay competitors not to manufacture generic versions of their products, thereby ensuring that they maintain patent protection for as long as possible.

While recent steep increases in the price of prescription drugs after their production rights were acquired by new manufacturers were met with howls of outrage, critics say that reverse settlements have drawn little scrutiny.

Regulators and courts are struggling to figure out when the agreements cross the murky legal line laid down by the U.S. Supreme Court two years ago. But in the meantime, the deals have cost consumers billions of dollars over the past 22 years, according to a 2009 study of the practice.

"In most industries, if you paid somebody to stay out of your market or you entered into an agreement to stay out of the market, that's a straightforward antitrust violation," says Lisl Dunlop, a partner and antitrust specialist at the Manatt, Phelps & Phillips law firm.

But with drug law, it's far more complicated because of the Hatch-Waxman Act, a landmark food and drug policy legislation signed into law in 1984.

To lower health care costs for prescription medicines, the bill streamlined the introduction of cheaper generic versions of drugs by removing the requirement that manufacturers of non-branded equivalents conduct their own costly clinical trials. Instead, it required them only to prove that the molecule in the drug is the same as that in the brand-name version.

Related: 'They Put a Price on My Life': Cost of Cystic Fibrosis Drugs is Sky High

By making it much less expensive to produce generic drugs, and including a provision requiring pharmacists to provide customers with generic versions of medications unless a doctor specifically orders otherwise, the law ensured that the pharmaceutical companies would lose virtually their entire market share when drug patents expire after 20 years.

"The brand-name manufacturers face more than just a drop off in demand," says Dunlop. "It's going to be precipitous; they're hardly going to get any money after the patent expires."

But drug makers soon found new ways to extend the patent protection by slightly tweaking the active molecule or delivery mechanism — such as creating an extended-release version of a drug as the patent for an instant-release version was about to expire — so that the product is technically novel while still fundamentally the same. That enabled them to apply for a new patent that would provide them with another 20 years free of competition.

The introduction of tweaked drugs in turn led to a burst of lawsuits by generic drug manufacturers challenging the legitimacy of the new patents and gave birth of a new cottage industry in the legal world.

In reverse-settlement cases, the brand-name manufacturer pays the plaintiff to drop the suit and, in exchange, agree not to make a generic version of the drug for a specified period of time. That means the maker of the original drug continues to be the sole source of the drug until the agreement expires.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A trade group representing the pharmaceutical industry denies that the agreements mean consumers pay more, saying that the agreements commonly provide for an early end to patent protection and therefor earlier availability of generic versions of drugs than would otherwise be the case.

The deals were generally considered legal until 2013, when the U.S. Supreme Court, in a 5-4 ruling, said they could violate the law in some circumstances. But the court did not set a clear standard in its ruling in FTC v. Actavis, leaving state and federal courts to sort through the legal arguments.

Related: An 'Utterly Broken' Drug Market: The High Cost of Surviving Cancer

Since then, state and federal courts have variously interpreted the ruling, generally focusing on whether the offer made by the brand-name maker was so large that it reflected an understanding that it was likely to lose the generic maker's claims that the secondary patent was invalid.

The amount that changes hands in such agreements can be staggering.

For example, the drug maker Cephalon agreed to a settlement with the Federal Trade Commission on June 17 over allegations that it had paid four generic manufacturers $300 million to delay introducing off-brand —and much cheaper — versions of its popular drug Provigil, used to treat sleep disorders and frequently prescribed off-label as a stimulant. Cephalon, now owned by Teva, acknowledged no wrongdoing in the settlement and did not respond to a request for comment from NBC News.

The deal, which the FTC labeled an "anticompetitive scheme," enabled Cephalon to protect its profits from Provigil, which costs about $3,000 for a three-month supply vs. $1,800 for the generic equivalent, modafinil, and provided the generic makers with enough money to walk away.

"The people who lose out are the consumers who pay the higher prices. We’re agreeing to put the costs on someone who isn’t in the room.”

To give an idea of what those individual payments can add up to, the FTC settlement required Cephalon to forfeit $1.2 billion in profits.

"There's always that disconnect," says Mark Lemley, a professor of law at Stanford who represented plaintiffs in a recent reverse settlement case in California. "And it's why these parties can come to a deal over these payments: 'I stand to make $1 billion if I keep the monopoly, you stand to make only $200 million if you come in and compete with me, and consumers would benefit the rest. But I'll pay you $250 million to just stay out. I still get most of my profit, you get more money than you would have made,' and the people who lose out are the consumers who pay the higher prices. We're agreeing to put the costs on someone who isn't in the room."

Lemley worked for plaintiffs, including patients, pharmacies and insurers, on a case that reached the California Supreme Court in 2012 over a $398 million reverse settlement that Bayer paid generic manufacturer Barr to delay introducing a version of the popular antibiotic ciprofloxacin. In that case, the California Supreme Court ruled that the deal to delay production of a generic for Cipro, a brand-named drug that became a household name in 2001 as a first-line defense against anthrax, violated state antitrust laws and remanded the case back to the trial court. Without admitting any wrongdoing, Bayer settled the lawsuit in 2013 and agreed to pay $74 million to the plaintiffs.

Separately, Barr agreed to drop its patent suit against Bayer, leaving Bayer with the sole rights to Cipro until after the patent expiration.

Related: Company That Raised Drug Prices 5,000% Investigated by New York AG

Bayer and Barr had argued that invalidating these agreements would corrupt the profit incentive of creating new drugs and stifle the patent process. They declined a request from NBC News for comment on the case.

In a statement, PhRMA, the leading drug manufacturer trade group, said patent settlements benefit consumers.

"These settlements generally permit generic drugs on the market earlier than the patent expiration, leading to significant savings for consumers," it said. "Patent settlements do not extend the patent. In fact, historical data shows that the average length of market exclusivity for innovator medicines has decreased. The Supreme Court has provided the Actavis framework for the FTC to review these settlements on a case-by-case basis. And according to the most recent report by the FTC, the number of settlements with potential consideration has declined in recent years."

While the number of these agreements has declined in recent years, it remains at roughly the same level as 2009, said Lemley.

That is the same year that Scott Hemphill, a professor at New York University Law School, conducted the most comprehensive study of reverse settlements, looking at 21 deals from 1993 through 2008 and estimating that they had cost consumers $14 billion. Contacted by NBC News, Hemphill said he could not estimate how that figure has changed since then.

But a 2013 review that Hemphill conducted with Bhaven Samphat, an associate professor in Columbia University’s Health Department, indicated that drug makers are continuing to make relatively small changes to try to extend their patent protection, finding that 89 percent of reverse-settlement cases involve lawsuits over "secondary patents," or a part of the product unrelated to the active ingredient itself.

That, said Lemley, means the cumulative cost to consumers has continued to grow since Hemphill's groundbreaking study.

"It would be fair to estimate that the costs to consumers since 2009 have been even higher than they were before then," he said. "At a minimum, consumers certainly have overpaid for drugs by many billions of dollars as a result of these settlements."