We conducted a retrospective cohort study comparing the risk of serious infections between patients treated with tumor necrosis factor-a (TNFa) antagonists vs. vedolizumab in patients with inflammatory bowel diseases (IBD). Using an administrative claims database, we identified patients with IBD who were new-users of either TNFa antagonists or vedolizumab between 2014-2018 and had insurance coverage for at least 1y before and after treatment initiation. We compared the risk of serious infections (infections requiring hospitalization) between patients treated with vedolizumab or TNFa antagonists using marginal structural Cox proportional hazard models adjusted for baseline disease characteristics, healthcare utilization, comorbidities, and time-varying use of corticosteroids, immunomodulators and opiates. We included 4881 patients treated with TNFa antagonists (age, 41 ± 15y, 60% with Crohn's disease [CD]) of whom 434 developed serious infections over 5786 person-year [PY] follow-up, and 1106 patients treated with vedolizumab (age, 44 ± 16y, 39% with CD) of whom 86 developed serious infections over 1040-PY follow-up. Vedolizumab was associated with 46% lower risk of serious infections as compared with TNFa antagonists in patients with ulcerative colitis (HR,0.54 [95% CI,0.35-0.83), but no significant differences were observed in patients with CD (HR,1.30 [0.80-2.11]). Vedolizumab was associated with lower risk of extra-intestinal serious infections in patients with UC, but higher risk of gastrointestinal serious infections in patients with CD. In an observational study of patients with IBD, vedolizumab was associated with lower risk of serious infections as compared with TNFa antagonists, in patients with UC, but not in patients with CD.