Hajj in Saudi Arabia caused 14 Jordanian pilgrims to die of heat stroke.
The Jordanian foreign ministry said that 17 more Jordanians were missing.
Five Iranian pilgrims were also killed, the Iran Red Crescent said.
Jordan is making arrangements with Saudi Arabia concerning the burial or removal of the corpses.
Hajj, with 1.8 million pilgrims this year, is one of the largest global gatherings.
The pilgrimage comes with several hurdles, the worst being hot temperatures.
This week, temperatures in Mecca and Medina soared to 46C (114.8F).
The Saudi Arabian National Meteorological Centre further predicted above-average temperatures.
The Saudi authorities have conditioned zones and carry water with regard to heat hazards.