Hamas leader Khaled Meshaal has vowed never to recognise Israel and said his group will never abandon its claim to all Israeli territory.
Palestine is ours from the river to the sea and from the south to the north. There will be no concession on an inch of the land," he told a rally in Gaza on Saturday.
"We will never recognise the legitimacy of the Israeli occupation and therefore there is no legitimacy for Israel, no matter how long it will take," he said.
Hamas said 500,000 attended the four-hour event marking the 25th anniversary of the founding of Hamas. There was no independent estimate of the crowd.
Meshaal arrived in Gaza on Friday for 48 hours. He was born in the West Bank in 1956, but left with his family for exile in 1967 after Israel captured the territory.
He now spends his time between Cairo and Qatar and is expected to return Egypt on Sunday or Monday.
He paid particular praise to Egypt, calling it "our backer" and appeared to take a swipe at President Bashar al-Assad of Syria.
"Hamas does not support any regime or state that launches a bloody battle against its people," said Meshaal, who quit his home in Syria earlier this year after falling out with Assad.
Israel, the United States and the European Union consider Hamas a terrorist organisation.