Objective Following an episode of acute biliary pancreatitis, cholecystectomy is advised to prevent recurrent biliary events. There is limited evidence regarding the optimal timing and safety of cholecystectomy in patients with necrotising biliary pancreatitis. Design A post hoc analysis of a multicentre prospective cohort. Patients with biliary pancreatitis and a CT severity score of three or more were included in 27 Dutch hospitals between 2005 and 2014. Primary outcome was the optimal timing of cholecystectomy in patients with necrotising biliary pancreatitis, defined as: the optimal point in time with the lowest risk of recurrent biliary events and the lowest risk of complications of cholecystectomy. Secondary outcomes were the number of recurrent biliary events, periprocedural complications of cholecystectomy and the protective value of endoscopic sphincterotomy for the recurrence of biliary events. Results Overall, 248 patients were included in the analysis. Cholecystectomy was performed in 191 patients (77%) at a median of 103 days (P25-P75: 46-222) after discharge. Infected necrosis after cholecystectomy occurred in four (2%) patients with persistent peripancreatic collections. Before cholecystectomy, 66 patients (27%) developed biliary events. The risk of overall recurrent biliary events prior to cholecystectomy was significantly lower before 10 weeks after discharge (risk ratio 0.49 (95% CI 0.27 to 0.90); p=0.02). The risk of recurrent pancreatitis before cholecystectomy was significantly lower before 8 weeks after discharge (risk ratio 0.14 (95% CI 0.02 to 1.0); p=0.02). The complication rate of cholecystectomy did not decrease over time. Endoscopic sphincterotomy did not reduce the risk of recurrent biliary events (OR 1.40 (95% CI 0.74 to 2.83)). Conclusion The optimal timing of cholecystectomy after necrotising biliary pancreatitis, in the absence of peripancreatic collections, is within 8 weeks after discharge.