"Saudi Arabia treats all Palestinians on an equal footing… and it has increased the number of visas granted to Gaza residents because of their circumstances," a foreign ministry spokesman said.
The spokesman, quoted by the official SPA news agency, said visas for the annual pilgrimage to the holy Saudi city of Mecca were being granted through the Palestinian Authority of president Mahmud Abbas.
In remarks posted on Saturday on the website of the Islamist Hamas, Atef Edwan said that Riyadh had allowed thousands of people registered with the Palestinian Authority in the West Bank to have visas but not the 2,200 in the Israeli-blockaded Gaza who applied through Hamas.
"By ignoring those Gaza pilgrims registered with the Waqf (department of religious affairs) Saudi Arabia is making a political mistake that will have negative consequences on the Saudi regime and the whole region," Edwan said.
Hamas seized control of the impoverished Gaza Strip in June 2007 from forces loyal to Abbas, whose writ now holds sway only in the Israeli-occupied West Bank.
Witnesses and would-be pilgrims told AFP on Saturday that Hamas prevented scores of Muslims wanting to travel to Mecca from reaching the Rafah border with Egypt.
Egypt had announced on Friday that the Rafah crossing would be open for three days from Saturday to allow the passage of some 3,000 Palestinian pilgrims with Saudi visas.
Hamas said last week that it would not allow would-be pilgrims who obtained visas through the West Bank authorities to join the hajj unless Hamas was also given a quota to allocate to the faithful.