Inverness Royal Academy will reopen to pupils on Monday after being closed last week when a sprinkler system flooded parts of the school.
A test of new gas cookers in the home economics classroom led to sprinklers being activated.
The incident last Wednesday evening meant Highland Council had to shut the building on Thursday and Friday.
Water spread into a number of first and ground floor classrooms and corridors, including the library and kitchen.
The school said in a tweet: “Morrison Construction confirm necessary works completed to allow school to re-open. We look forward to welcoming our students back tomorrow.”
The secondary school is the largest and also one of the newest schools in the Highlands.
It has about 1,000 students, but has a capacity for more than 1,400.
Highland Council said the cooker test was being carried out by contractors on the instructions of Hub North Scotland and Morrison Construction, the two companies that led the construction of the academy.