Firefighters battled a fire at Sir Guy Carleton Elementary in Vancouver's Joyce Collingwood neighbourhood.

The fire, which was in the school's main brick building, started at about 7:15 p.m. PT Friday evening and was quickly upgraded to a four-alarm blaze.

Officials said the flames started on the third floor and spread to the attic, where the fire was contained.

There were 50 firefighters on scene, with some remaining on fire watch throughout the night.

Officials said they do not know what caused the fire.

People gather to watch crews fighting a fire at Carleton Elementary in East Vancouver. (Cliff Shim/CBC)

'Devastating blow'

Dozens of people, including elected officials, gathered to watch crews put out the fire.

"This school is absolutely admired and loved for what it does for this neighbourhood," said Adrian Dix, the MLA for the area.

"Despite what is a devastating blow here tonight we're going to fight on for Carleton because it's the heart of this neighbourhood."

4th-grader Rodelle says ‘it hurt’ to watch her school go up in flames earlier. <a href="https://t.co/pIlOqrnon2">pic.twitter.com/pIlOqrnon2</a> —@gpsmendoza

Carleton was one of 12 schools on the Vancouver School Board's preliminary list for closure earlier this year because of declining enrollment.

Dix said thousands of people signed a petition to save the school. The VSB's latest plans show 274 students attend Carleton Elementary.

Carleton Elementary is a great school.5000 already have signed on to the campaign to support it,Bruce+Gladstone.We plan 2 step it up. <a href="https://twitter.com/hashtag/bced?src=hash">#bced</a> —@adriandix

Vancouver School Board trustee Patti Bacchus was also on scene. She said she rushed over as soon as the heard about the fire.

"It's a pretty devastating sight to see flames coming from the roof of an elementary school in Vancouver," Bacchus said.

The fire was quickly upgraded to a four-alarm blaze. (Jacky Chui/Twitter)

The school superintendent had been in touch with board trustees that evening, she said, and plans were already being made to accommodate students returning in September.

Because of declining enrolment, one of the school ground's older main buildings had been shut down and all classrooms were transferred to the main brick building.

Bacchus said it may be possible to accommodate the students back in the older building.

Heritage building

Carleton is one of Vancouver's oldest schools; it's listed on Vancouver's Heritage Register and parts of it were built in 1896.

The main brick building was built in 1911-1912, according to Heritage Vancouver.

There are four buildings on site: the main brick school house, the older, smaller wooden school house, and two smaller buildings recently renovated and operated by Greenthumb Theatre.

It's not the first fire at the school. In March 2008, the Greenthumb buildings were badly damaged by a fire, which was later determined to have been caused by arson.