The Old Grammar School, with its warped oak beams and 350-year-old student graffiti, is to get a multi-million-pound makeover after winning the hearts of thousands of television viewers.
The dilapidated school in King's Norton, Birmingham, is joint winner of the pound;3million jackpot of BBC2's Restoration programme. It shares the cash with the nearby Saracen's Head medieval manor house.
Since the campaign to save the grade II* listed building was launched in July, it has received visitors from all over the country who are fascinated by its history.
The Rev Heather Flack, King's Norton parish team vicar, said: "People have taken a real interest - it has really brought the community together.
"Visitors come and sit in the schoolmaster's desk to be photographed. They can imagine all the angry words which have been said in this beautiful setting. It has shown that the passion for education then and now is unchanged."
The building, which served the community for 350 years, fell into disrepair during the 19th century and was on English Heritage's "at risk" list.
It was built as a house on stilts around 1434, with just one room and an outside staircase; a second room was added underneath when it became a school. Under the strict regime of Thomas Hall, a Puritan who took over as schoolmaster in 1629, The Old Grammar School became one of the most successful schools in England.
The campaign to save it unearthed evidence that the school was used by the Home Guard during the war. A parishioner also found a book awarded as a prize during Sunday school classes held there in 1911.
Dr Wendy Robinson, education historian from Warwick university, said: "Many old school buildings have had to be demolished or converted, which is a sad loss because they tell us how teaching and learning used to take place.
"This success is more than just celebrating some nostalgic or sentimental view of the past - a school has a huge impact on the lives of the pupils and teachers "This win represents something positive about the way the community is thinking about children and their future."
The school was entered in the competition with The Saracen's Head. Together they beat off 20 other competitors including the Working Men's Institute and Memorial Hall in Newbridge, Wales, and Gayle Mill in North Yorkshire.
More than 750,000 votes were cast in the final, raising pound;506,138 for the winning project. This was added to a pound;2.5m pledge from the Heritage Lottery Fund.