WASHINGTON — Supreme Court justices appeared troubled Monday over whether to stop deals between pharmaceutical corporations and their generic drug competitors that the government says could keep cheaper forms of medicine from American consumers for longer periods of time.

Justices heard arguments from the Justice Department against what the government calls ‘‘pay-for-delay’’ deals or ‘‘reverse settlements.’’

Such deals arise when generic companies file a challenge at the Food and Drug Administration to the patents that give brand-name drugs a 20-year monopoly. The generic drug makers aim to prove the patent is flawed or otherwise invalid, so they can launch a generic version well before the patent ends.

Brand-name drug makers then usually sue the generic companies, which sets up what could be years of expensive litigation.

When the two sides aren’t certain who will win, they often reach a compromise deal that allows the generic company to sell its cheaper copycat drug in a few years — but years before the drug’s patent would expire.

Often, that settlement comes with a sizable payment from the brand-name company to the generic drug maker.

Drug makers say the settlements protect their interests but also benefit consumers by bringing inexpensive copycat medicines to market years earlier than they would arrive in any case generic drug makers took to trial and lost.

Justice Kagan’s view

However, federal officials counter that such deals add billions to the drug bills of American patients and taxpayers, compared with what would happen if the generic companies won the lawsuits and could begin marketing right away.

A study by RBC Capital Markets Corp. of 371 cases from 2000 to 2009 found brand-name companies won 89 at trial, compared with 82 won by generic drug makers. Another 175 ended in settlements, and 25 were dropped.

The Obama administration, backed by consumer groups and the American Medical Association, wants the court to stop the deals because it says they profit the drug companies but harm consumers by adding $3.5 billion annually to their drug bills.

‘‘What the brand name is attempting to purchase is protection from the possibility that it will have its patent invalidated, and it will suffer a large competitive advantage,’’ Justice Department lawyer Malcolm L. Stewart told the justices.

What if a brand-name drug company is making $100 million, and a generic drug company says its product will reduce that to $10 million, so both companies agree that the brand name company would give the generic company $25 million to stay off the market, asked Justice Elena Kagan.

‘‘It’s clear what’s going on here is that they’re splitting monopoly profits, and the person who’s going to be injured are all the consumers out there,’’ Kagan said.

Generic drugs account for about 80 percent of all American prescriptions for medicines and vaccines, but a far smaller percentage of the $325 billion spent by US consumers on drugs each year.

Generics saved American patients, taxpayers, and the health care system an estimated $193 billion in 2011 alone, according to health data firm IMS Health.

But Justice Sonia Sotomayor said it may be going too far to make these deals illegal on their face, instead of making the government prove they are anticompetitive in court in each case.

Eight justices will decide this case later this year. Justice Samuel Alito did not take part in the arguments.