Syrian state television said the explosion struck the Carlton Hotel in a government-held area on the edge of a contested neighborhood in the old part of Aleppo.
The Britain-based Syrian Observatory for Human Rights, which maintains a network of activists on the ground, said at least 14 soldiers were killed in the blast. The Islamic Front, Syria's biggest rebel alliance which claimed the attack, claimed to have killed 50 soldiers. Both groups did not say how they know how many soldiers died, and the claims could not be independently verified.
In a live broadcast from the site of blast, the station's correspondent in Aleppo stood on a huge pile of rubble with twisted metal and palm trees sticking out, saying that the army had been using the building as a base and soldiers were positioned there at the time of the explosion. In the broadcast, Syrian TV did not mention casualties but said the rebels blew up the building by tunneling underneath and planting explosives.
"They use tunnels like rats because they cannot face the Syrian Arab Army," the correspondent said, adding that the explosion felt like an earthquake to those around Aleppo.
The attack was the second carried out by the Islamic Front against the Carlton. The first, allegedly carried out also through explosives-packed tunnels, caused a partial collapse of the building in February. The Front, an alliance of several Islamic groups fighting to topple Assad, appears to favor this technique and has used it to carry out deadly attacks against government forces in Aleppo and Idlib provinces.
Thursday's explosion was much more powerful and sent an enormous mushroom of gray smoke into the sky and over the ancient city, according to a video posted online by activists. The video appeared genuine, matching Associated Press' reporting on the blast.
The explosion was a blow to President Bashar Assad's government in the north as his troops prepare to regain control of the central city of Homs following last week's cease-fire agreement after a fierce, two-year battle with the rebels trying to oust him.
Rebels were completing their withdrawal from Homs on Thursday, a day after hundreds of fighters evacuated from the city under the cease-fire deal.
No such agreement appears to be in sight in Aleppo, Syria's largest city and former commercial hub. The city has been carved up into opposition- and government-held areas since the rebels launched an offensive there in mid-2012, capturing territory along Syria's northern border with Turkey.
In recent months, government aircraft relentlessly has bombed rebel-held areas of the city and the opposition fighters have hit back, firing mortars into government-held areas. The rebels also have detonated car bombs in residential areas, killing dozens of people.
The Islamic Front posted a statement on its official Twitter account Thursday saying that its "fighters this morning leveled the Carlton Hotel barracks in Old Aleppo and a number of buildings near it, killing 50 soldiers."
The Observatory said Islamic Front fighters planted a huge amount of explosives in a tunnel they dug below the hotel and detonated it remotely. It said the hotel was completely destroyed in the blast and at least 14 government soldiers were killed in the blast.
The Syrian government does not publicize its casualties in the civil war.
Meanwhile Thursday, more rebels were expected to leave the central city of Homs as an evacuation of opposition fighters moves into its second day.
Homs Gov. Talal Barazi told Syrian state TV that that the evacuation process is being conducted in "positive atmosphere." He said Homs will be declared a "secure" city once the army moves in later Thursday.
Barazi was seen touring Homs on Lebanon's Al-Manar TV, which is owned by the Shiite militant group Hezbollah. Hezbollah has been battling rebels in Syria alongside government troops for months.
A reporter with Syrian state TV was seen broadcasting live from an entrance to Homs Old City. Standing near the city's main square known as the Clock Square, the reporter interviewed a priest who said he hoped people in the city would be safe again.
The Observatory, which has been documenting Syria's 3-year-old conflict, said that about 250 opposition fighters remain in the old districts of Homs, where they have been holed up under a crippling government siege for more than two years. The Observatory's head, Rami Abdurrahman, said more than 960 left the city Wednesday.
An activist in Homs who goes with the name of Beibares Tellawi told the AP that seven buses went into a once-besieged area of Homs on Thursday to take the remaining rebels out of the city.
"The siege of old Homs will be over in a few hours," Tellawi said via Skype. "We expect that everyone left inside will leave today."
In exchange for the rebels' safe departure from Homs, the opposition fighters have released 70 people who had been held by gunmen in various areas, including in Aleppo and in the coastal province of Latakia, Barazi said.
Syria's uprising began with largely peaceful protests and has evolved into a civil war with sectarian overtones, pitting largely Sunni Muslim rebels against Assad's government that is dominated by Alawites, a sect of Shiite Islam.
Islamic extremists, including foreign fighters and Syrian rebels who have taken up hard-line al-Qaida-style ideologies, have played an increasingly prominent role among fighters, dampening the West's support for the rebellion to overthrow Assad.
Associated Press writers Albert Aji in Damascus, Syria, and Yasmin Saker in Beirut contributed to this report