Like most people, I occasionally binge on spicy food and pay the price with heartburn. A simple antacid usually fixes the problem for me -- but for some people, heartburn is a perpetual problem. Generic competition for the drugs to treat this malady may be sweet relief for those unlucky folks, but it's more aggravation for the pharmaceutical firms that invented the drugs in the first place.

When a patient has gastroesophageal reflux disease, or GERD, the liquid content of the stomach regurgitates -- or refluxes -- back into the esophagus, inflaming and sometimes damaging its lining. The liquid usually contains acid and pepsid, an enzyme that starts the digestive process in the stomach, both of which help to create the burning sensation associated with heartburn. GERD sufferers can chew as many Rolaids as they want, but the relief is just temporary; only stronger, prescription medicines can truly fix the problem.

Some of the best-known remedies are Nexium, from AstraZeneca (NYSE:AZN), and Prevacid, from TAP Pharmaceuticals. Japanese pharmaceutical Eisai (OTC BB: ESALY.PK) makes a third formulation called Aciphex, which it co-markets with Johnson & Johnson (NYSE:JNJ). Among these remedies, only Aciphex still has patent protection, until 2013. That's both a boon and a bane for the company.

Nexium followed AstraZeneca's previous heartburn pill Prilosec, which lost patent protection and became a popular over-the-counter remedy. And TAP recently announced that it would be licensing Prevacid's formulation to Novartis (NYSE:NVS) to make an OTC version. So with Aciphex standing virtually alone as a patent-protected medicine, it should see its tiny market share rise, right? Not exactly.

Whether its Nexium's esomeprazole, Prilosec's omeprazole, Prevacid's lansoprazole, or Aciphex's rabeprazole sodium, all are included in a family known as proton pump inhibitors. They shut down the production of stomach acid and help heal stomach ulcers and esophageal inflammation. With intense competition in the market, there is significant price pressure, particularly from the OTC and generic versions. Eisai, which earns an estimated $1.3 billion from Aciphex, can't necessarily keep the price high simply because it enjoys a patent moat.

Mylan Laboratories (NYSE:MYL) recognizes this and filed -- and was tentatively approved for -- the right to make a generic version of Aciphex. Mylan's problem is that the patent protection prohibits it from manufacturing the drug just yet; the tentative approval means the FDA would allow it, but the patents prevent it. That's why Mylan has been challenging Eisai's patents, and why Eisai has been filing patent infringement lawsuits against Mylan, Dr. Reddy's Labs (NYSE:RDY), and TevaPharmaceuticals (NASDAQ:TEVA) over their attempts to market Aciphex knockoffs.

In a market estimated to grow to $23 billion by 2009, and with generics taking an estimated 13% of that total, the ability to establish a product creates incentive to move in. Whether the tentative FDA approval will help Mylan's standing in court is unknown just yet, but watching the jockeying going on in the proton-pump-inhibitor sector is enough to give you an ulcer. Pass the Rolaids.

Check out these related spicy Foolish articles:

Fool contributor Rich Duprey owns shares of Eisai but does not own any of the other stocks mentioned in this article. You can see his holdings here. The Motley Fool has a disclosure policy.