The 32-year-old Northern Ireland international, whose previous deal would have expired at the end of the current season, joined the Saints in 2011.
Manager Tommy Wright told the club's official website: "I am absolutely delighted that he has signed. He has been one of the top goalkeepers in the country over the last three seasons.
"He's committed for two years with an option beyond that so we are all pleased.
"We've been speaking for some time now but there was never any problem. Alan has always just liked to take his time when considering his future, which he is absolutely right to do."
Mannus has kept 13 clean sheets during the current Scottish Premiership campaign for last season's Scottish Cup winners.