Updated

The leader of the Islamic militant group Hamas vowed to continue fighting Israel Saturday, as hundreds of thousands of flag-waving Gazans turned out to celebrate the organization's 25th anniversary.

Khaled Mashaal's visit to the Palestinian territory — a first in his lifetime of exile — underscores Hamas' rising clout and regional acceptance since its eight-day conflict with Israel last month.

At the main stage in Gaza City, a roaring crowd greeted Mashaal and Gaza Prime Minister Ismail Haniyeh, who emerged from a door built into a large model of a rocket fired at Israeli cities during the recent fighting.

Hamas' green dominated the gathering, where some children wore military uniforms and others carried guns. Masked gunmen holding automatic rifles flanked the podium where Mashaal gave a fiery speech.

"We are not giving up any inch of Palestine. It will remain Islamic and Arab for us and nobody else. Jihad and armed resistance is the only way," Mashaal said, referring to holy war. "We cannot recognize Israel's legitimacy."

Mashaal said he would continue to secure the release of Palestinian prisoners from Israeli jails — referring to a swap last year where an abducted Israeli soldier was exchanged for more than 1,000 Palestinian prisoners.

The 56-year-old Mashaal, who left the West Bank as a child and now leads Hamas from the Gulf state of Qatar, entered Gaza on Friday via Egypt.

Hamas has received a boost from the political ascension of its parent movement, the fundamentalist Muslim Brotherhood, in the wake of last year's Arab Spring revolts — especially in Egypt.

It has also upped its profile as master of the Gaza Strip, leading it through the bloodiest round of fighting with Israel in four years and coming to a cease-fire arrangement in talks brokered by Egypt.

Hamas claimed victory in the conflict after holding its own despite airstrikes and maintaining an almost constant barrage of rocket attacks on Israeli cities.

The Nov. 21 cease-fire stipulated Israel would stop targeting militants. That, along with unprecedented support from Egypt, allowed Mashaal to make the visit without fear of Israeli assassination, which he has narrowly escaped in the past.

Israel, the U.S. and European Union list Hamas as a terrorist organization. Israel is now holding indirect talks with the group as a result of the cease-fire arrangement.