JCI-accredited hospitals · 45+ hospitals & clinics · Patients from 90+ countries · 24/7 multilingual coordination
Gastroenterology

Constipation, Diarrhea, and Stomach Pain Causes

Published October 25, 2026
Woman experiencing stomach pain during an ultrasound exam at a hospital.

Constipation followed by diarrhea and stomach pain is often related to temporary changes in bowel movement patterns, such as diet changes, infection, medication effects or irritable bowel syndrome. Sometimes loose stool passes around retained hard stool, known as overflow diarrhea; ongoing, severe or concerning symptoms should be assessed by a clinician.

What does constipation followed by diarrhea and stomach pain mean?

Constipation followed by diarrhea and stomach pain may happen when the bowel is temporarily irritated or when stool moves unevenly through the colon. Common explanations include a stomach infection, dietary changes, medication effects, irritable bowel syndrome (IBS), or loose stool passing around retained hard stool. The pattern alone cannot confirm a diagnosis, especially if it is new, recurrent or becoming more severe.

Constipation generally means bowel movements are infrequent, hard, difficult to pass, or feel incomplete. Diarrhea refers to loose or watery stools, often occurring more often than usual. Cramping or stomach pain may arise as the intestines stretch, contract or become sensitive to gas and stool.

A brief change in bowel habits may settle with hydration, regular meals and time. However, alternating bowel habits that last for weeks, disrupt daily life, occur at night, or are accompanied by warning signs should be discussed with a qualified doctor. Evaluation is particularly important when symptoms begin later in adulthood or differ clearly from a person’s usual pattern.

How alternating bowel habits can occur

Woman experiencing stomach pain during an ultrasound exam at a hospital.

The bowel normally absorbs water from digested food while moving stool toward the rectum. If movement slows, more water is absorbed and stool becomes dry and hard. If movement speeds up, less water is absorbed, leading to loose stools. Changes in intestinal movement can therefore produce constipation at one time and diarrhea at another.

One important possibility is overflow diarrhea, also called paradoxical diarrhea. In this situation, a large amount of hard stool becomes lodged in the rectum or lower colon. Watery stool from higher in the bowel can leak around the blockage, which may be mistaken for ordinary diarrhea. People may also notice bloating, lower abdominal discomfort, straining, incomplete emptying, or stool leakage.

The same symptoms may occur with heightened bowel sensitivity. In IBS, the intestine may react more strongly to normal digestion, stress, particular foods or hormonal changes. Pain and bowel habit changes are real and can be troublesome, even though routine tests may not show inflammation or structural disease.

Common triggers and possible causes

Doctor consulting a patient with stomach pain at Acibadem Hospitals Group.

Many everyday factors can alter bowel habits. Not drinking enough fluid, reduced activity, travel, disrupted routines, delaying the urge to pass stool, and a sudden reduction in dietary fiber may contribute to constipation. A sudden increase in fiber without adequate fluid can also cause gas, cramping or looser stools in some people.

Short-term diarrhea and abdominal pain can follow viral or bacterial gastrointestinal infections, food-related illness, or use of antibiotics. After an infection has resolved, some people experience temporary changes in bowel sensitivity and stool consistency. Stress, anxiety and poor sleep may also affect gut movement and worsen symptoms in people who are prone to functional bowel disorders.

Medicines and supplements can be relevant. For example, some pain medicines, iron supplements, antacids containing certain ingredients, and medications with anticholinergic effects may cause constipation. Laxatives, magnesium-containing products, antibiotics and some diabetes medicines may cause diarrhea. A person should not stop prescribed medication without speaking with the prescribing clinician.

Other possible causes include food intolerances, celiac disease, Ulcerative Colitis, and Flares" class="ahp-ilk">inflammatory bowel disease, thyroid disorders, pelvic floor problems, diverticular disease, and less commonly a narrowing or obstruction in the bowel. Irritable bowel syndrome is a common explanation for recurrent abdominal pain with altered stool frequency or form, but it should be diagnosed after appropriate clinical assessment.

Symptoms to note and patterns that help diagnosis

The timing and character of symptoms can offer useful clues. Cramping that improves after passing stool, together with recurrent constipation and diarrhea, may be consistent with IBS. Diarrhea that begins soon after a new medication, antibiotic course, travel, or exposure to someone with a stomach illness may suggest a medication effect or infection.

Hard, infrequent stools followed by small-volume watery stool, seepage, marked bloating, and a persistent feeling of blockage can point toward stool retention or fecal impaction. This is more likely in older adults, people with limited mobility, those using constipating medicines, and people with neurological conditions, although it can occur in others as well.

It can be helpful to keep a brief symptom record before a medical appointment. Include when symptoms began, frequency and appearance of stools, pain location, foods and drinks, recent travel, illness contacts, menstrual timing where relevant, medicines and supplements, and any blood, fever or weight change. This information can make evaluation more focused.

  • Is the pain mild, cramping, constant, or worsening?
  • Does pain improve, worsen or remain unchanged after a bowel movement?
  • Are stools black, bloody, very pale, greasy or unusually narrow?
  • Have there been nighttime symptoms, fever, vomiting or loss of appetite?

How doctors assess the problem

A clinician will usually begin with a detailed history and physical examination, including review of medicines, diet, previous digestive conditions and family history. Depending on symptoms, the examination may include gently checking the abdomen for tenderness, distension or masses. In selected cases, a rectal examination can help identify retained stool, bleeding or other concerns.

Not everyone needs extensive testing. For mild, short-lived symptoms without warning signs, supportive care and follow-up may be appropriate. If symptoms persist or red flags are present, clinicians may request blood tests, stool tests for infection or inflammation, or imaging to investigate possible obstruction or other abdominal conditions.

A colonoscopy or other bowel evaluation may be advised based on age, symptoms, screening history and clinical findings. These tests help assess the lining of the large bowel and can identify inflammation, polyps, bleeding sources or other structural causes. Colonoscopy may be recommended when it is clinically appropriate, rather than simply because bowel habits have changed once.

Treatment and practical self-care

Treatment depends on the underlying cause. A self-limited infection may primarily require rest and careful fluid replacement, while medicine-related symptoms may improve after a clinician reviews the treatment plan. If stool retention is present, a clinician may advise a structured approach to clearing retained stool and preventing recurrence. It is important not to repeatedly treat presumed diarrhea with anti-diarrheal medicines if constipation, impaction or blockage is possible.

For uncomplicated constipation, gradual lifestyle measures are often helpful. These include drinking adequate fluids unless a clinician has advised fluid restriction, eating regular meals, increasing fiber slowly when tolerated, being physically active, and allowing time for a bowel movement without straining. Fiber is not suitable for every situation, particularly when obstruction is suspected or severe bloating and pain are present.

For diarrhea, the priority is usually replacing fluids and electrolytes. Bland, familiar foods may be easier to tolerate temporarily. Alcohol, very fatty foods and large amounts of caffeine can aggravate symptoms for some people. A doctor or pharmacist can advise whether an over-the-counter product is appropriate, particularly for children, older adults, pregnant people, or anyone with a chronic health condition.

When IBS is diagnosed, management may include identifying personal triggers, dietary guidance, stress-management approaches and symptom-directed medicines. A gastroenterologist can help when symptoms are persistent, diagnosis is uncertain, or first-line measures have not helped. Gastroenterology care can provide individualized assessment for complex or recurring digestive symptoms.

When to seek medical care

Medical advice should be sought promptly for severe or steadily worsening abdominal pain, a swollen or rigid abdomen, repeated vomiting, inability to pass stool or gas, or signs of dehydration such as dizziness, very dark urine, fainting or markedly reduced urination. These symptoms can indicate a problem requiring urgent assessment.

Contact a doctor soon if there is blood in the stool, black or tar-like stool, persistent fever, unexplained weight loss, anemia, ongoing fatigue, or diarrhea that continues beyond a few days without improvement. New bowel changes in a person with a family history of colorectal cancer, inflammatory bowel disease or celiac disease also merit discussion with a clinician.

Children, older adults, pregnant people, and people with weakened immune systems may become dehydrated or unwell more quickly and should have a lower threshold for seeking advice. Acıbadem Health Point’s multidisciplinary specialists and JCI-accredited hospitals assess and treat digestive concerns for international patients, with care tailored to the individual’s symptoms and medical history.

Frequently asked questions

01Can constipation cause diarrhea afterward?

Yes. Constipation can be followed by loose stool when bowel movement returns to normal, when dietary or medication changes affect the gut, or when liquid stool passes around retained hard stool. This latter pattern, called overflow diarrhea, should be evaluated if it is recurrent or accompanied by bloating, pain or leakage.

02Is constipation followed by diarrhea a sign of IBS?

It can be, particularly when abdominal pain recurs and is related to bowel movements or changes in stool frequency and form. However, IBS is not the only cause, and a clinician should consider infection, medication effects, food intolerance and other digestive conditions before confirming the diagnosis.

03What should someone eat when constipated and then having diarrhea?

Simple, regular meals and adequate fluids are usually sensible while symptoms settle. Fiber should be introduced gradually rather than abruptly, and choices should be guided by tolerance. If diarrhea is significant, fluid and electrolyte replacement is important; persistent symptoms require medical advice.

04Should anti-diarrheal medicine be used after constipation?

Not always. Anti-diarrheal medicine may be unsuitable if loose stool could be leaking around impacted stool or if there is fever, blood in the stool, severe pain or suspected infection. A pharmacist or doctor can advise based on the person’s symptoms and medical history.

05How long can alternating constipation and diarrhea last?

A short-lived change may improve within days, especially after a dietary disruption or mild infection. Symptoms lasting several weeks, repeatedly returning, or interfering with normal activities should be assessed by a healthcare professional. The timing and accompanying symptoms help guide testing and treatment.

06Can stress cause stomach pain with constipation and diarrhea?

Stress can influence the gut-brain connection and may change bowel movement patterns, increase cramping or make existing digestive symptoms feel more intense. It should not be assumed to be the only cause, especially when symptoms are new, severe or associated with warning signs.

This article is for general information only and is not a substitute for professional medical advice. Please consult a qualified doctor about your individual situation.

Add Acıbadem on Google

Add us as a Preferred Source to see more of our trusted health content across Google Search, AI Overviews and Discover.

Share this page
Was this content helpful?
Your feedback helps us improve.
Keep Reading

More from the Health Library

We’re With You at Every Step

How can we help you today?

Treatments are delivered at our JCI-accredited hospitals — Acıbadem International
We value your privacy We use essential cookies to run this site and, with your consent, analytics cookies to understand how it is used and improve it. You can accept, reject, or choose what to allow. See our Cookie Policy.