SAN JOSE — A firefighter suffered a heart attack and collapsed Thursday morning at the scene of a three-alarm fire at St. Patrick’s Cathedral on East Santa Clara Street downtown, just blocks away from City Hall.

Thick black smoke quickly filled the church and sent parishioners fleeing for their lives, and flushed students from their classrooms at the adjacent parochial school.

Fire Chief William McDonald told reporters the injured firefighter is Frank Ryan, a 15-year veteran of the department. McDonald said Ryan collapsed at the fire scene and was in critical but stable condition at Regional Medical Center of San Jose, where other firefighters gathered in support.

“This firefighter, at great risk today, has a pretty serious injury. Our hearts are going out to him and his family,” fire Capt. Mary Gutierrez said outside the church, her voice choking with emotion. “It’s been an incredibly tough day for all of us. It’s been a tough day for the city.”

Gutierrez later confirmed reports that Ryan suffered cardiac arrest, and that it happened during the fire, but did not have further details. She hoped to issue an update later Thursday.

The fire was reported at 11:22 a.m. by multiple callers who saw heavy smoke emanating from the cathedral’s steeple section. When it spread to the school, students and staff were evacuated to nearby Horace Mann Elementary School. They were allowed back in after the fire was extinguished just before noon.

Nguyen Nguyen, a 40-year-old Sunnyvale resident, was locking up his bike across the street from the church when he saw smoke billowing out of the church doors. He then saw five people run outside.

“Then there was smoke coming out of the side and the glass started popping out,” Nguyen said.

Within eight minutes, the fire department called a third alarm, summoning a total response of 60 firefighters, Gutierrez said.

Ryan was found injured at 11:56 a.m., about the time the fire was brought under control. Gutierrez said a crisis team has been deployed to help counsel the firefighters.

Gutierrez said a cause for the fire was not immediately known, but that it started in the front of the church. Fire investigators are examining the site.

Contact Robert Salonga at 408-920-5002. Follow him at Twitter.com/robertsalonga.