For Mr. Meshal, 56, whom the Israelis tried to assassinate in Jordan in 1997, it was a triumphant day as Hamas fighters, armed with rifles and wearing balaclavas, lined the streets where he was to travel. He entered from Egypt, through the Rafah crossing, an indication of a new alliance with Cairo after the fall of President Hosni Mubarak, an avowed adversary of Hamas.
“Gaza, with its martyrs, cannot be described in words,” he said as he arrived here, with tears in his eyes. “There are no words to describe Gaza, to describe the heroes, the martyrs, the blood, the mothers who lost their sons.”
Mr. Meshal, who has spent years in exile and now spends most of his time in Qatar, had never before been to Gaza, but he said he felt as if he was returning because “Gaza has always been in my heart.”
Mr. Meshal’s visit resonated on multiple levels, reflecting the many changes that have swept the region since the Tunisian revolution, which began in December 2010 and ignited the Arab Spring uprisings. Mr. Meshal was permitted to cross the Egyptian border now that allies of the Muslim Brotherhood — a cousin of Hamas — have come to power in Egypt. At the same time, Hamas tried to use his visit to reinforce the impression that it is ascendant and no longer a pariah.
Mr. Meshal arrived in Gaza to celebrate the 25th anniversary on Saturday of the founding of Hamas. His visit, 15 years after Israel nearly assassinated him, is a kind of victory for Hamas, which has just negotiated with Israel, however indirectly, for a cease-fire after a bloody conflict last month. His visit also provided a visible unity in Palestinian territory of Hamas in exile, represented by Mr. Meshal, and Hamas on the ground, in the person of the Gazan prime minister, Ismail Haniya, who met him at Rafah and traveled with him through a noisy and celebratory day.
Mr. Meshal fled the West Bank with his family at age 11 after the 1967 Arab-Israeli war. He said Friday that he had returned once to the West Bank in 1975, but had not entered Palestinian territory since. In 1997, when he was in Amman, Jordan, agents from the Israeli intelligence service, posing as Canadian tourists, tried to kill him by injecting him with poison. The agents were captured by Jordanian authorities, and Mr. Meshal lay in a coma until Benjamin Netanyahu, then and now the Israeli prime minister, was pressured to hand over an antidote.
“This is my third birth,” Mr. Meshal said. “The first was my natural birth. The second was when I recovered from the poisoning. I ask God that my fourth birth will be the day we liberate all of Palestine.”
As a practical matter, Israel deals indirectly with Hamas but regards it as a terrorist group that uses violence against civilians in its effort to drive Israelis from the region.
Later, in an emotional speech to supporters, Mr. Meshal said: “Today is Gaza. Tomorrow will be Ramallah and after that Jerusalem, then Haifa and Jaffa.” Mr. Meshal also referred to the Palestinian boundaries of 1949, not of 1967, and said that Palestinian unity would come on “national principles, of Jerusalem, the right of return, and the West Bank.” He told the many young fighters of Hamas “to please keep your fingers on the trigger,” and said, “There is no politics without resistance.”
He was speaking to an impassioned crowd at the home of Ahmed al-Jabari, the operational commander of Hamas forces, killed by Israel at the outset of November’s fighting, a man Mr. Meshal praised as the key figure “in the victory of the eight-day battle” with Israel.
The eight days of fighting included Israeli airstrikes and shelling, and Hamas rocket launchings against Israel. The Israeli government asserts that it sharply reduced Hamas’s military capacity by killing Mr. Jabari and destroying storehouses of rockets and weapons.
Still, Hamas negotiated a cease-fire with Israel through the Egyptians, and for the movement it may represent an important step toward becoming a more recognized international player and representative of at least a portion of the Palestinian people.
Mr. Meshal also visited the homes of Sheik Ahmed Yassin, a Hamas spiritual leader assassinated in 2004, and of the Dalu family, who lost 10 members in an Israeli airstrike on Nov. 18.
On Friday, Human Rights Watch said the airstrike on the Dalu home was “a clear violation of the laws of war.” In a statement, it said its field investigation into the attack concluded that even if there had been a legitimate military target inside the house, the likelihood that the attack would have killed large numbers of civilians inside made it “unlawfully disproportionate.”
In the days after the attack, the Israeli military offered different explanations about the actual target. It has not yet said whether it knew that the house was filled with people at the time of the strike. In a preliminary response to the Human Rights Watch report, the military said the Dalu residence had been identified as “the hide-out of a senior Hamas militant” involved in launching rockets. Without naming the person, the military said those who used the people of Gaza as human shields were ultimately responsible for the civilians’ deaths.
The Fatah movement, a rival of Hamas, controls the West Bank, which Israel still occupies. Despite all the talk on Friday of Palestinian unity, the rivalry between Fatah and Hamas remains the defining principle of Palestinian politics.
Decorating the stage where the anniversary celebration will be held Saturday is a mock-up of a large rocket, called the M-75, that Hamas claims it has built on its own and can reach almost 50 miles, close to Tel Aviv. The M stands for a dead founder of Hamas, Ibrahim Maqadma, killed in an Israeli airstrike in 2003.
In fact, the Hamas anniversary is Dec. 14, but the organization moved the celebration forward a week to honor the first uprising against Israel.
Fares Akram contributed reporting from Gaza, and Isabel Kershner from Jerusalem.