GAZA CITY, Gaza Strip — The emir of Qatar received a hero’s welcome in Gaza on Tuesday, becoming the first head of state to visit the Palestinian territory since the Islamist Hamas seized control of the coastal strip five years ago. The Israeli Foreign Ministry condemned the visit, saying Qatar has chosen to support a terror organization.

In a speech at Gaza’s Islamic University, Sheik Hamad bin Khalifa Al Thani urged Hamas and the rival Fatah faction to put aside their differences.

“Why are you staying divided?” he said. “There are no peace negotiations, and there is no clear strategy of resistance and liberation. Why shouldn’t brothers sit together and reconcile?”

The visit of Al Thani was called “historic and courageous” by Hamas Prime Minister Ismail Haniyeh, who greeted and embraced the sheikh on his arrival in Gaza. The visit “has broken the political and economic blockade of the Gaza Strip,” Haniyeh said. “This visit proves Gaza is not alone.”

However, the emir canceled a planned address to the Palestinians in Gaza City’s main soccer stadium at the last moment Tuesday afternoon.

Hamas officials at the stadium announced the cancellation and ordered thousands of people who gathered there on Tuesday to go home.

The address had been the centerpiece of the visit to Gaza.

Hamas cited the emir’s tight schedule in announcing the change. But the stadium was only about one-fifth full around the time of the cancellation.

The emir instead gave an address to a much smaller crowd at a Gaza university instead, where he and his wife received honorary degrees.

All day, white and maroon Qatari flags flapped in the streets of Gaza and a song called “Thank you, Qatar” played on the radio and on TV. In the border area, Hamas set up a large, carpeted greeting tent, reminiscent of a luxurious desert camp.

During the arrival ceremony, Haniyeh announced that Al Thani was increasing Qatar’s Gaza aid package to $400 million, significantly higher than the previously announced $250 million figure.

Thousands of cheering and waving Palestinians lined the main road to greet the emir, who rolled down the window of his armored car to shake hands with dozens of people. Women on balconies threw flowers and rice on his convoy.

“This man is bold. I like him. At least he came and visited us, and didn’t play games promising like the others,” said Majed Tawel, a 33-year-old teacher. “Hamas has won a new victory today and (Abbas) lost.”

Al Thani’s visit gave Gaza’s Hamas rulers an important diplomatic victory. Hamas is considered a terrorist group by the West and its rule of Gaza is not internationally recognized.

Israel condemned the visit. Foreign Ministry spokesperson Yigal Palmor said the emir has chosen to support a terror organization that “makes the lives of Israelis and Palestinians miserable.” He questioned Qatar’s choice of supporting one side of the internal Palestinian conflict, and said the decision to support violent extremists was an act of “throwing the peace process under the bus.”

The visit reflects the rising influence of Hamas’s parent movement, the Muslim Brotherhood, since last year’s Arab Spring uprisings. Along with the Brotherhood in Egypt, Islamist groups have made gains throughout in the region and Qatar has been a key ally of rebel and opposition movements.

The rival Palestinian government in the West Bank has expressed deep reservations over the visit of oil-rich Qatar’s emir. While President Mahmoud Abbas welcomed Qatar’s plans to deliver aid to impoverished Gaza, he has also stressed that he is the internationally recognized leader of the Palestinians.

Hamas seized control of Gaza from Abbas’s Fatah forces in 2007, and West Bank officials fear the emir’s visit will deepen the split between the two territories. Abbas seeks to create an independent state in the two areas, along with East Jerusalem.

The emir crossed into Gaza from Egypt. The Qatari and Palestinian national anthems were played before an honor guard ceremony.

The emir’s aid of $400 million to the territory will bolster Hamas and help ease its economic woes. An Israeli blockade meant to weaken Hamas has hit Gaza’s economy hard, though the Islamic group remains firmly in control.

During his four-hour visit, the emir opened a housing project and a hospital.

At the stadium where the emir was to address a packed crowd, Gaza women piled into the back stands reserved for them hours ahead of the speech. They sat under the watchful eye of Hamas policewomen in uniforms of long blue robes, light blue headscarves and navy hats.

“I’m desperate, trying to find a job for my son,” said Kifaya Gharabli, 42, who came early in the morning in hopes of catching a glimpse of the Qatari visitors.

Part of the aid package is a $150 million housing project near the southern town of Khan Younis. It will be built near the site of a former Israeli settlement, abandoned when Israel withdrew from Gaza in 2005. The project is called Hamad City — after the Qatari emir — and will take about two years to build.

Israel restricts the entrance of building materials into Gaza, saying they could be diverted by Hamas for bunkers or military use. In order to get around the Israeli blockade, Qatar plans to ship in the materials through the Egyptian border.

Israel launched a military offensive against Hamas in late 2008 in response to years of Hamas rocket fire. Though the rocket attacks have slowed, they continue intermittently, and various terror groups, including al-Qaeda-inspired Salafis, remain active in the area.

Early Tuesday, a roadside bomb near the Gaza border fence wounded an IDF officer.