Several people were injured including 13 who were in critical conditions, Al Masirah TV television news outlet run by the Iran-aligned Houthi movement reported, citing the director of health in Sanaa.
The stampede took place during the distribution of charitable donations by merchants in the final days of the Muslim holy month of Ramadan, the Houthi-controlled Ministry of Interior's spokesperson said in a statement.
Hundreds of people had crowded into a school to receive the donations, which amounted to 5,000 Yemeni riyals, or about $9 per person, two witnesses involved in the rescue effort told Reuters.
A video posted by Houthi television on Telegram messaging app showed a crowd of people jammed together, some screaming and shouting and reaching out to be pulled to safety. Security staff fought to push people back and control the crowd.
Another video after the stampede showed scores of discarded shoes, a crutch and clothing on the steps of the building, and forensic investigators in protective white suits sorting through personal belongings.
The two merchants responsible for organising the donation event had been detained and an investigation was underway, the interior ministry said.
Yemen has been embroiled in an eight-year civil war which has killed tens of thousands of people, wrecked the economy and pushed millions into hunger.
A Saudi-led coalition intervened in Yemen in 2015 after the Houthis ousted the government from the capital Sanaa in 2014. The conflict has widely been seen as a proxy war between Saudi Arabia and Iran.
Mohamed Ali al-Houthi, head of the Houthi supreme revolutionary committee, said the stampede was the result of the Yemeni people suffering "the worst global humanitarian crisis" after eight years of fighting.
"We hold the countries of aggression responsible for what happened and for the bitter reality that the Yemeni people live in because of the aggression and blockade," he said on Twitter.
Riyadh and Tehran in March agreed to restore diplomatic ties severed in 2016 and prisoner exchanges this month between the two sides have raised hopes of a resolution to the conflict.
The top negotiator of Yemen's Houthi movement said recent peace talks with Saudi Arabia had made progress and further discussions would be held to iron out remaining differences.