Egypt opened its border with Gaza on Monday to let in hundreds of Palestinian pilgrims headed for Saudi Arabia - the first time Palestinians have been allowed to cross directly into Egypt since Hamas seized control of Gaza in June. But the crossing quickly hit a snag when Egyptian riot police rushed to the border after passengers broke a crossing gate. The police surrounded the border terminal, stranding the travelers at midday, security officials in Egypt said. They were allowed to proceed after a delay of several hours, Hamas officials said. Israel has allowed small numbers of Gaza residents to pass through its territory and into neighboring Egypt for humanitarian reasons. But this was the first time Gazans have been allowed to pass directly into Egypt since the Hamas takeover. Seven hundred pilgrims made the crossing Monday after receiving visas from Saudi Arabia, home to Mecca and Medina. A further 1500 were expected to pass on Tuesday, said Hamas and Egyptian officials. "Egypt... opened its heart and arms and allowed the opportunity to prove that the ties of nationalism, Arabism and Islam prevail, and allowed our pilgrims to pass through Egypt," said Hamas Prime Minister Ismail Haniyeh, speaking at a police graduation ceremony. Hamas officials said they had negotiated with Egypt to open the border. Israeli officials said they had also coordinated the departure, though they gave no further details. Marwan Shurafi, whose mother crossed into Egypt on Monday, said the pilgrims wore traditional white clothing and chanted in praise of Allah as they crossed into Egypt. The pilgrimage to Mecca in Saudi Arabia, known as the haj, is an obligation every able-bodied Muslim is expected to carry out once in a lifetime. The haj will take place later this month. Salah al-Reqeb, Hamas's deputy minister for religious affairs, said his government smuggled the passports of 2,200 Gaza pilgrims through a tunnel into Egypt, where the Saudi Arabian consulate issued them visas. The passports were then returned to Gaza through a tunnel, he said. The movement of Gaza pilgrims through Egypt suggested a softening stance from Cairo toward Hamas. Egypt has had little contact with the group since it seized power. It was also a blow to the rival Fatah-led government in the West Bank, which promised to ship pilgrims out through Israel. Egypt and Saudi Arabia, both traditional supporters of Fatah, were both involved in Monday's passage. Because of the religious sensitivities, Hamas officials had hoped to pressure neighboring countries to facilitate the movement of Gaza pilgrims.