The 27-year-old defender missed last season’s William Hill Scottish Cup triumph but wants to play his part as the Saints try to secure more silverware in the near future.
“It’s good to get it sorted,” Scobbie said. “We have been speaking about it for a number of months now and I’m just glad to get it done and get a bit of security for the next couple of years.
“We clinched a top-six place on Saturday and it’s another step in the direction the club wants to go in.
“We have managed to do that four years on the bounce now and, over the next couple of seasons, hopefully we can push forward again, keep making the top six and keep pushing for trophies.”
Saints manager Tommy Wright added: “Tam is part of a defence which has been particularly strong this year so I’m delighted to keep him.
“He’s another piece of the jigsaw finished as we build towards next season.”