Gaza's ruling Hamas movement has chosen Yahya Sinwar, freed in a 2011 prisoner swap with Israel after more than 20 years in jail, as its new chief in the Palestinian enclave following an internal election, sources close to the group said.

Sinwar will be a key decision-maker for Hamas and a member of the executive leadership that draws up policies, including towards Israel.

With the group's overall chief Khaled Meshaal in exile, Gaza-based officials have wielded more clout in the past decade.

Hani Habeeb, a Gaza political analyst, said Sinwar's victory sent a message of defiance to Israel and was also likely to complicate efforts further to conclude a stalled reconciliation with rival Palestinian President Mahmoud Abbas's Fatah faction.

READ MORE: Freed senior Hamas leader vows to fight on

Israel sentenced Sinwar to four life terms in the late 1980s. He served 23 years for leading the group's first security apparatus, which was responsible for tracking and killing Palestinians accused of collaborating with Israel.

Six years ago, Israel freed him in a swap of 1,047 Palestinian prisoners for Israeli soldier Gilad Shalit, who was abducted by Gaza fighters in a cross-border raid in 2006.

In 2014, Sinwar backed a Palestinian unity government with Fatah but talks have faltered repeatedly.

Sinwar is set to replace Ismail Haniyeh in the election that was last held in 2012.

The sources said Sinwar polled best in the vote that was open only to members of Hamas, including those in Israeli jails. Khalil Al-Hayya, a political official, was chosen as Sinwar's deputy.

Filling the position of Hamas's political chief, who also speaks for its military wing, will require more time. Haniyeh and Moussa Abu Marzouk, currently the two deputies to the group's overall leader, Meshaal, appear to be the leading candidates for the job.

Source: News agencies