A- Inclusion Criteria:
1. Patients 18 - 85 years of age
2. Two or more documented attacks of acute pancreatitis, separated by 3 months from one another, defined by at least 2 of the following 3:
1. amylase or lipase values, or both, that are greater than 3 times the upper limit of normal values
2. characteristic cross-sectional imaging
3. typical upper abdominal pain according to the revised Atlanta classification28
3. Drug/placebo treatment to start
1. Mild AP Patient is discharged out of the hospital 30 days after diagnosis of mild AP
2. Moderate Severe or Severe AP Patient is discharged out of hospital Intra-abdominal collections are either resolved on imaging, or are improving and asymptomatic (VAS Pain score ≤3 \[with or without pain medication\], vomiting ≤once a week, tolerating light diet, and no fever and chills) and do not warrant any intervention (per treating physician)
4. Ability to understand and the willingness to sign a written informed consent document and medical release
5. Willing and able to comply with trial protocol and follow up
6. 2nd AP episode despite correction of the AP etiology (if identified) after the 1st episode as follows i. Patients with biliary pancreatitis who have undergone cholecystectomy, with or without ERCP (if indicated) ii. Patients with hypertriglyceridemia induced pancreatitis who have serum triglyceride levels below 400 while on medication management iii. Patients with medication induced AP developing a 2nd AP episode despite stopping the culprit medication
B- Exclusion Criteria:
1. Age \< 18 or \> 85 years.
2. Body weight \> 200 kg.
3. Ongoing AP (in right clinical situation defined by pain\>3, vomiting ≥once a week, fever or chills, not tolerating light diet) or diagnosis of AP in previous 30 days.
4. Diagnosis of chronic pancreatitis, one of the following
1. Ductal stricture, calcification and/or atrophy, as seen on CT scan/MRI
2. 5 or more of the 9 EUS criteria used to diagnose CP
5. Known hypersensitivity to Pirfenidone.
6. AST/ALT \> 3 times the upper normal limit.
7. Alkaline phosphatase \>2.5 times the upper normal limit.
8. Bilirubin higher than upper normal limit.
9. Moderate to severe heart failure and/or coronary heart disease (New York Heart Association (NYHA) Functional Class III/IV).
10. On home oxygen or home mechanical ventilation.
11. Advanced liver disease as defined by Child-Pugh cirrhosis B or C.
12. Paralytic ileus or significant nausea and vomiting preventing administration of light diet.
13. Chronic diarrhea (\>6 months, 3 or more stools/day-Clinically not appearing to be steatorrhea \[fecal fat if done less than 15 g per day and fecal elastase if done more than 100\].Active cancer (on chemotherapy, radiation or treatment of cancer at the time of enrollment) or cancer free \<3 years (non-melanoma skin cancer are not a contraindication)
14. Known cancer that is end-stage with ongoing palliative care or for which palliative care is appropriate.
15. Known history of infective hepatitis (Hepatitis B or C)\[can enroll if treatment and cure is documented\]
16. Ongoing photosensitivity and rash.
17. Known live vaccines or therapeutic infectious agents within one month of admission.
18. Known pregnancy or lactation at the time of admission.
19. Women of childbearing potential who are not on oral or injectable contraceptives or IUDs, and do not consent to adequate contraception while on, and for 90 days after the administration of the drug/placebo.
20. Known to be currently participating in a trial testing any investigational medicinal product or participation in a clinical study involving a medicinal product in the last three months.
21. Problematic pattern of alcohol use or moderate to severe alcohol use disorder (Appendix 2)
22. Substance use disorder (except recreational or medicinal use of marijuana) \[if patient underwent and completed a rehab program, has not used substances for at least one year, and has an adequate support system, they may be enrolled\]
23. Family or personal history of long QT syndrome (\> 500 msec).
24. Strong CYP1A2 inhibitors (e.g., fluvoxamine, enoxacin) or moderate CYP1A2 Inhibitors (e.g., ciprofloxacin).
25. Renal disease with GFR \< 30.
26. Any condition other than above that, in the opinion of the investigator, is likely to result in the death of the patient within the next 2 years.
27. Any condition that, in the opinion of the investigator, might be significantly exacerbated by the known side effects associated with the administration of Pirfenidone.