Posh were waiting to discover what division they would be in before tying the 30-year-old to an extended deal, which includes the option of a further year.
Thompson, who can play either at right-back or in central defence, joined Peterborough in the summer of 2019 from Portsmouth and has been a regular starter.
Manager Darren Ferguson said on theposh.com: “He was extremely professional and he was one that we wanted to get sorted and thankfully we have reached an agreement.
“He is really enjoying his football, he and his family are settled in the area, so it was a big one for us because you always have more of a worry when a player is out of contract. His performances have been outstanding, he has been one of our most consistent performers.”
Thompson is looking forward to plying his trade in the Championship, saying: “I have been plugging away in League One for the best part of 12 years so to finally get an opportunity to play in the Championship made the decision very easy for me.”
He joins Ricky Jade-Jones, Frankie Kent and Ronnie Edwards in putting pen to paper.