Inclusion Criteria:
* Male or female aged 18 to 80 years inclusive, at the time of signing the Informed consent form (ICF).
* Diagnosis of IBS-D or IBS-M according to the Rome IV criteria at screening
* Moderate or severe irritable bowel syndrome (IBS) based on Irritable bowel syndrome Severity Scoring System (IBS SSS) at screening visit
* Weekly API score \>=4.0 in each week of the run-in period
* IBS-D: at least one stool with BSFS Type 6 or 7 consistency on at least 2 days in each week of the run-in period
* IBS-M: an average of 2 days per week with abnormal bowel movements (BSFS Type 1, 2, 6, or 7) during the run-in period, and greater than (\>)25% of abnormal bowel movements must be Type 6 or 7 and \>25% Type 1 or 2
Exclusion Criteria:
* Diagnosis of Irritable bowel syndrome - constipation (IBS-C) or Irritable bowel syndrome - unclassified (IBS-U)
* History or presence of inflammatory or immune-mediated Gastrointestinal (GI) disorders e.g. inflammatory bowel disease, microscopic colitis, or celiac disease
* History or presence of GI infection (confirmed with stool culture) within 3 months prior to screening
* History or presence of bile salt diarrhea
* History of a primary psychiatric diagnosis that the Investigator considers may interfere with study assessments (e.g., schizophrenia, schizoaffective disorder, major depression, anxiety, panic attacks or bipolar disorder) OR Hospital Anxiety and Depression Scale (HADS) score of \>10 at screening.
* Prior use of more than two of the following therapies or classes of therapy for the management of IBS:
* Antidepressants or neuromodulators (e.g., Tricyclic antidepressant \[TCAs\], Selective serotonin reuptake inhibitor \[SSRIs\], gabapentinoids)
* Antibiotics (e.g., rifaximin, neomycin)
* 5-hydroxytryptamine 3 (5-HT3) receptor antagonists (e.g., alosetron, ramosetron, ondansetron)
* Mu-opioid receptor agonists (e.g., eluxadoline)
* Secretagogues (e.g., linaclotide, lubiprostone, plecanatide, tenapanor)
* 5-hydroxytryptamine 4 (5-HT4) receptor agonists (e.g., tegaserod)
* Abnormal thyroid function tests less than (\<) Lower limit of normal (LLN) or greater than (\>) upper limit of normal (ULN) confirmed at screening with Thyroid stimulating hormone (TSH)
* Positive celiac serology
* Elevated fecal calprotectin levels
* QT interval corrected using Fridericia's formula (QTcF) \>450 millisecond (msec) or QTcF \>480 msec for participants with bundle branch block using the Fridericia's corrected QT interval.
* Clinically significant abnormal laboratory tests at screening, after one repeat laboratory test if allowed by the Medical Monitor, including the following:
* Alanine aminotransferase (ALT) \>2\*ULN
* Total Bilirubin \>1.5\*ULN
* Aspartate aminotransferase (AST) \>2\*ULN
* Current or chronic history of liver disease (Child-Pugh class A, B, or C) or biliary abnormalities (with the exception of asymptomatic gallstones). Participants with known or suspected Gilbert's Syndrome are not permissible.