Sixth year pupils pulling a last day-school prank were not to blame however.
A spokesman from Dumfries and Galloway Council said: “An exam was interrupted by an alarm and later completed according to SQA guidelines.
“Fire and Rescue Service officers who attended could find no evidence of the alarm being activated on campus and concluded that a fault was responsible. Engineers from the alarm supplier are investigating a fault, which triggered the alarm.”