On his first appearance of the 2016–17 season against Sampdoria on 11 September, Totti equalled Paolo Maldini's record of playing in 25 Serie A seasons. With Roma trailing 2–1 at half time, Totti came off the bench and assisted Edin Džeko's temporary equaliser, later also scoring the match-winning goal from a penalty in injury time to secure a 3–2 home win in Serie A; Totti's goal meant that he had managed to score at least once in each of the past 23 consecutive seasons of his career. On 25 September, he scored his 250th Serie A goal from the penalty spot in a 3–1 away defeat to Torino, just two days before his 40th birthday. On his first start two days after his 40th birthday, on 29 September, Totti was praised for his performance and longevity in a 4–0 home win over Astra Giurgiu in the Europa League; he played all 90 minutes of the match, providing two assists, while also being involved in a third goal. On 20 October, Totti made his 100th appearance in UEFA club competitions, setting up two goals in a 3–3 home draw against Austria Wien in the Europa League. In late October, he sustained a muscle injury to the flexor of his left thigh during a training session, which ruled him out indefinitely. He returned to action as a substitute in a 3–2 home win over Pescara on 27 November.