After Bologna were relegated to Serie B in 2004–05, despite Pagliuca's outstanding season, he stayed with the club for one more year; then he returned to Serie A, accepting a contract with Ascoli for one year starting in summer of 2006. On 17 September 2006, Pagliuca set the record for most Serie A appearances for a goalkeeper, overtaking Dino Zoff, as he started against Messina. He retired at the end of the season.