Toronto Fire says a pyrotechnic test ahead of the Pan Am Games was the reason for smoke billowing from the CN Tower Thursday evening.

Pan Am officials confirmed that fireworks were set off from the CN Tower “as part of the dress rehearsal for the Pan Am Games opening ceremony.”

The pyrotechnic test was announced at a press conference held at the CIBC Pan Am Park earlier in the day, an official said.

Most Torontonians, however, did not receive the warning and took to social media as the test caused a frightening view of the observation deck at the CN Tower.

Toronto Fire says a display similar to this can be expected Friday night.