The 24-year-old attacking midfielder was on loan to Posh prior to lockdown, but has now officially signed a four-year contract with the club, despite interest from others.
Manager Darren Ferguson said: "I said I was 95% done in terms of players coming into the club, I am now 100% there! We are delighted. In the last week things have accelerated a little bit in the sense he probably wasn’t going to get the game time at Bristol City and Darragh has been so determined to get it over the line, he has worked very hard and wouldn’t let go until he got the deal done.
"It is a permanent deal; it is good that Sammie has committed to us because he wanted to play Championship football and feels that can be achieved with us. We know what he brings to the squad. His performances were very good last season with us, his personality is great and we know that he is a good player, he is someone that I was aware of for a very long time.
"It is a really big signing for us. I know there was interest from several clubs in our league but he always said if he was going to sign for a club in League One, it would be us, and credit to him because he has stuck to his word. I think it has been a relentless effort from Darragh to get this done so you have to say well done to him for going that extra mile to get this over the line on a permanent basis.
"The boy was adamant he wanted to come here, and I am really looking forward to working with him again. We will assess him today in training and see where he is at fitness wise, but it is great to get him in the building."
Sammie has made his excitement clear, saying: "I am delighted to be back. I feel there is a bit of unfinished business from last season. We were going so well and I was really enjoying my football. My best mate Frankie is here, he doesn’t know I am back yet and I will be kipping at his house so I am sure a few people will be surprised."
He scored four goals in 10 appearances for Posh during the loan spell, from January last season, and will wear the number 15 shirt.
It's some good news for the club after star striker Ivan Toney moved to Brentford last week. Other transfer window signings include Jonson Clarke-Harris, Ryan Broom, Ethan Hamilton, Ronnie Edwards and Dan Gyollai.