Background and Aims: It is debated whether the need for surgery has changed following introduction of anti-TNFα agents in the treatment of paediatric ulcerative colitis [UC] and Crohn's disease [CD]. We aimed to describe the implementation of anti-TNFα agents in paediatric patients, and the need of first-time surgery before and after introduction of anti-TNFα agents. Methods: In the Danish National Patient Registry, we identified incident paediatric patients diagnosed from 1998. We calculated the proportion of patients receiving anti-TNFα agents within 5 years from diagnosis, and the cumulative 5 year proportion of surgery, according to calendar periods of diagnosis. Results: At the end of our study period [2007 and 2008], 29-41% of CD children were treated with anti-TNFα agents within 5 years, and for UC children 17-19%. In 1278 CD patients, the 5 year cumulative proportions of surgery were 14.6-15.6% for children diagnosed in 1998-2008 and 9.7% (95% confidence interval [CI]: 6.7-13.7) for those diagnosed in 2009-2013. In 1468 UC patients, the cumulative proportion of surgery suggested a decline in patients diagnosed after mid 2005, and the hazard ratio of surgery was 0.64 [95% CI: 0.47-0.86] after the introduction of anti-TNFα agents compared with before. For UC patients diagnosed in 2009-2013, the 5 year cumulative proportion of surgery was 7.6% [95% CI: 5.2-11.2]. Conclusions: This nationwide study showed an extensive use of anti-TNFα agents at the end of our study period. For UC children, our data suggest a decline in the proportion of surgery in the period of increasing use of anti-TNFα agents.