Dozens of firefighters from nine departments battled a blaze Thursday evening at historic St. Mary Roman Catholic Church on Valley Street.

At about 8:30 p.m., the fire was not out, though it was contained to the rear of the circa 1903 stone structure, said Matt Vertefeuille, public relations officer for Windham.

“It’s still a very dangerous situation,” he said.

The fire was reported at 6:35 p.m., Vertefeuille said. Firefighters on the scene saw smoke coming through the roof, and a second and third alarm were called in by 6:45 p.m., he said.

About a block away from the church, a monthly summer street festival called Third Thursday had started about 6 p.m. The festival, the first of the year, brought 7,000 to 8,000 people to the area.

Most of them became spectators as the firefighters worked.

“We came down to Third Thursday,” said Bruce Delmastro, of Lebanon, who watched the fire with his wife, Karen Delmastro. The Delmastros were married in St. Mary 34 years ago, they said.

“We prayed on the way down it wouldn’t be so bad,” Karen Delmastro said.

Tracy and Bill Glennon said they were married in the church in 1992. They, too, came to Third Thursday and stayed to watch the fire.

“Flames were coming out the back,” Bill Glennon said, when they got to the scene at about 7 p.m.

“It’s so sad,” said Peggy Dugan, of Mansfield.

St. Mary was being renovated, and scaffolding had been set up throughout the building.

Vertefeuille said Thursday revening it was far too soon to know if the renovations were a cause of the fire.

As firefighters worked, two tower trucks at opposite corners of the church poured water onto the roof. The pressure was so great that slate shingles shot into the air. Water poured off the roofs and out the front door of the church like a waterfall.

But, Vertefeuille said, firefighters were having difficulty breaking through the slate roof, and the roof was trapping heat inside and was unstable besides, making it almost impossible for firefighters to venture inside.

Vertefeuille said, however, that firefighters were preparing to enter the church to retrieve sacred artifacts. About 8:30 p.m., utility officials cut electricity to the block around the church.

It is believed the church was empty when the fire broke out. No injuries have been reported.