The final minutes of debate on the Senate’s fiscal 2025 budget were interrupted late Thursday night by an emergency alarm in the State House, forcing senators, staffers and building workers to evacuate around 10:45 p.m. The budget passed without dissent just after midnight Friday.

State police said at 11:11 p.m. that senators and staff could go back inside, saying there had been a water leak in the basement of the building. Senators gaveled back into session by 11:18 p.m.

“What an interesting night,” Senate President Karen Spilka said as she addressed the chamber following the unplanned half-hour recess at the end of the three-day debate.

Senators voted unanimously, 40-0, just after midnight Friday morning to pass the $57.999 billion budget bill.

With the Senate back in its chamber and having engrossed its budget, “the dance” with the House can begin after the long Memorial Day holiday weekend. Lawmakers are supposed to have a fiscal 2025 budget in place by the time that year starts July 1, but Massachusetts is routinely one of the last states in the country to put an annual budget in place.

When the emergency alarm went off at 10:43 p.m., the Senate was talking about a Sen. Jason Lewis amendment that would reboot the effort to reconsider the state seal, motto and flag with a new group when an emergency alarm blared during Sen. Jo Comerford’s remarks.

“Attention please. The signal tones you have just heard indicate a report of an emergency in this building. Please walk to the nearest exit and leave the building,” a recording said as the fire alarms went off.

Sen. William Brownsberger, the presiding officer, put the Senate in a recess subject to the call of the chair but asked people to stay close until they knew what was going on. Many senators, staffers and others evacuated under the Mt. Vernon Street archway.

After the Lewis amendment, all that remained of the 1,100 amendments filed to the Senate Ways and Means Committee’s $57.9 billion fiscal 2025 budget was the technical amendment from Chairman Michael Rodrigues.

Since beginning to consider amendments on Tuesday, senators adopted 475 amendments, rejected 400 and withdrawn 225. Most of those adopted and rejected amendments were dispensed with in bursting bundles that can check off dozens of proposals with a single voice vote.