Once reviled as a hardliner but now seen increasingly in the Arab world and by some Westerners as a moderate, Mashaal, 56, has headed the movement that rejects Israel's existence and controls the Palestinian territory of Gaza, since 2004.
Born near Ramallah in the West Bank, Mashaal steered Hamas through the upheaval unleashed by the Arab Spring uprisings. He spent decades in exile and visited Gaza for the first time ever in December.
Mashaal left Syria about a year ago after ties ruptured with President Bashar Assad over the bloody civil war there.
Building on relations with Egyptian President Mohamed Morsi, said to be an old friend, Mashaal moved on to win a delicate truce with arch-enemy Israel in November and has also sought to heal a rift with rival Palestinian President Mahmoud Abbas.
Palestinian officials and analysts said Mashaal, dogged by Gaza critics of his ceasefire with Israel and efforts to reconcile with Abbas, had to be persuaded to continue as Hamas's leader for another term.
"Mashaal was re-elected," a Hamas official said, reporting in a terse statement on Tuesday on the results of a meeting that began in the Egyptian capital on Monday. The official gave no other details of the vote by which about 60 top officials of the group had reaffirmed Mashaal anew as Hamas's political leader.
Both Egypt and powerful Gulf emirate Qatar also lobbied strongly on Mashaal's behalf, a diplomat in the region told Reuters.
"They saw Mashaal as a moderate and an example of a leader who saw the world more comprehensively than other hardliners in the group," said the diplomat, who spoke on condition of anonymity.
Turkey was also part of the effort to convince Mashaal to change his mind and stay on as Hamas' politburo chief.
Mashaal's re-election marks a victory for his camp, which seeks internal Palestinian reconciliation in accordance with the Doha agreement, signed between Mashaal and Abbas last year. It is possible that Mashaal wants to eventually merge Hamas and the Palestinian Liberation Organization.
European nations that boycott Hamas and list it as a terrorist group for its violence against Israel - including suicide bombings in an uprising a decade ago and rocket strikes on Israeli towns - were also seen as supportive of Mashaal retaining in his post.
"I do not say Europe is going to open to Hamas tomorrow," said the diplomat, who saw an opening for a "real engagement with the West" if Mashaal persuaded Islamist colleagues to change their policies.
Mashaal burnished his credentials as leader of the Palestinian terror group after surviving a 1997 Israeli assassination attempt. Hamas was founded in 1988 shortly after the launch of an uprising against Israel.
In 2004, Mashaal succeeded Hamas's founder, Sheikh Ahmed Yassin, after the cleric was assassinated by Israel during a second Palestinian revolt against the Jewish state.
On his watch, Hamas has emerged as an ever more important player in the Middle East conflict, weakening the US-backed Palestinian Authority by seizing control of coastal Gaza in 2007, and challenging Abbas's peacemaking with Israel.
Despite his falling out with Syria over Assad's bloody attempts to quell a revolt, Mashaal has gone out of his way to maintain relations with Islamist Iran, which has supplied Hamas with weaponry including rockets it has fired at Israel.
More lately though Mashaal has sought to overcome his differences with Abbas, leader of the Fatah movement founded by the late Yasser Arafat and head of a Palestinian self-rule authority in the West Bank.
Two years ago he faced down angry Gazans by voicing support for Abbas's peace moves with Israel, though he remained skeptical whether the negotiations frozen since 2010 would ever secure the Palestinian goal of independent statehood.
More recently Mashaal was involved in indirect talks with Israel mediated by Egypt, striking a truce that has largely silenced fighting along the Israel-Gaza frontier since a deadly eight-day conflict four months ago.
You can contact Elior Levy, Ynet's Palestinian Affairs Correspondent, at: firstname.lastname@example.org
- Receive Ynetnews updates
directly to your desktop