BEIRUT, Lebanon — Airstrikes by the Syrian government damaged a hospital in the northern city of Aleppo early on Thursday and flattened a building next to it, killing at least 15 people and leaving as many as 40 missing in an attack that closed one of the city’s few functioning medical facilities, antigovernment activists said.

Video purporting to depict the aftermath showed the facade shorn off the first three stories of the hospital, with its name, Dar el-Shifa, in red letters on its tower. Beside it, another building was reduced to a two-story pile of rubble. People milled in the street, shouting “God is great.”

Among the 15 people confirmed dead were two hospital workers and two children, said Abu Louai al-Halabi, an activist in Aleppo, adding that up to 40 people were still believed to be trapped under the rubble. One man was pulled out alive several hours after the explosion, according to another video posted on the Internet by opponents of President Bashar al-Assad.

Rebels seized a military base in southeastern Syria, giving them control of an area of oil-producing territory, and as tensions increased between antigovernment fighters and Kurdish groups in northeastern Syria. In both areas, near the border with Iraq, activists said that fighters from Al Nusra Front for the People of the Levant, a jihadi group, were taking a prominent role among the opposition fighters.