​Hamas has named a shadowy militant commander as its new leader in the Gaza Strip, an official media outlet confirmed on Monday, placing one of the Islamic militant group's most hard-line figures in charge of its core power base.

The appointment of Yehiya Sinwar, who was freed by Israel in a 2011 prisoner swap after two decades behind bars, solidifies the takeover of Gaza operations by the armed wing of the group from civilian leaders. The military wing, which controls thousands of fighters and a vast arsenal of rockets, has battled Israel in three wars since Hamas seized Gaza a decade ago.

The militant wing tends to take more hard-line positions toward Israel, while the politicians, who are tasked with improving the difficult living conditions in Gaza, tend to be more pragmatic.

Sinwar's selection was reported by Hamas' Al-Resala news site. A Hamas official, speaking on condition of anonymity because he was discussing the group's secretive election process, also confirmed the appointment.

Sinwar replaces Ismail Haniyeh, who served as the prime minister of Hamas' government following the 2007 takeover of Gaza and remains a top figure in the movement. Haniyeh is now expected to take over as Hamas' supreme leader, replacing Khaled Mashaal, who lives in exile.

Khalil al-Haya, another political hard-liner, was elected as Sinwar's deputy.

Hamas started its elections late last year, and the entire process is expected to be completed within the next two months with the naming of a new political bureau, consisting of representatives from Gaza, the West Bank, exiled Palestinian communities across the Middle East and prisoners held by Israel.

A Palestinian man salvages belongings from damaged buildings in Gaza City in July 2014. Israeli troop and settlers withdrew from the impoverished, densely populated territory in 2005. (REUTERS)

Released in 2011

Sinwar, who is in his mid-50s, comes from the southern Gaza town of Khan Younis and was a founder of Hamas' military wing in the 1980s. Hamas is sworn to Israel's destruction and has killed hundreds of Israelis in suicide bombings, shootings and other attacks. It is considered a terrorist group by Israel, the United States and the European Union.

Sinwar was sentenced to four life terms by Israel in 1988 for a series of offences, including his role as mastermind of the abduction and killing of two Israeli soldiers. During his final years in prison, he was the leader of the hundreds of Hamas prisoners held by Israel.

In 2011, Prime Minister Benjamin Netanyahu agreed to release Sinwar, along with about 1,000 other prisoners, in exchange for Gilad Schalit, an Israeli soldier who had been captured by Hamas five years earlier in a cross-border raid.

At the time, Netanyahu was harshly criticized for releasing dozens of prisoners held for involvement in deadly attacks. Israel says Sinwar's brother, Mohammed, was among the masterminds of the soldier's capture and negotiated the prisoner swap.

Sinwar, who rejects any reconciliation with Israel, has quickly restored his power in the movement since his return to Gaza. He is widely believed to be behind last year's unprecedented killing of another top Hamas commander in an internal power struggle.

Israel captured the Gaza Strip, along with the West Bank and east Jerusalem, in the 1967 Mideast war.

In 2005, Israel decided that its occupation of Gaza, an impoverished, densely populated territory that also borders Egypt, was unsustainable, and it withdrew all of its troops and settlers.

A Hamas militant displays a mortar shell in front of a destroyed house in Gaza City in August 2014. The militant wing tends to take more hard-line positions toward Israel, while the politicians tend to be more pragmatic. (Majdi Fathi/Reuters)

Ties to Qatar, Turkey

Sinwar has rarely appeared in public since a 2014 war with Israel. Ibrahim al-Madhoun, a pro-Hamas analyst who runs a Gaza think-tank, said he met Sinwar two months ago and got the impression that he is more interested in improving difficult conditions in Gaza than renewed conflict with Israel.

"He is interested in stability, the rebuilding of Gaza and easing the blockade," al-Madhoun said. "I felt he is more with the truce rather than conflict."

Sinwar has close ties to Qatar and Turkey, two of the few countries that have good relations with Hamas. Al-Madhoun said he also has good ties with Iran, a longtime backer of Hamas.

In a sign of moderation, Sinwar supported a failed 2014 reconciliation agreement with President Mahmoud Abbas' Fatah movement.

Under the deal, Hamas agreed to step aside to create a unity government that would reunite the West Bank and Gaza. But it was never implemented, and Hamas remains the de facto authority in Gaza. Haniyeh is no longer prime minister, but remains involved in Hamas' affairs as ministry officials administer the territory.

Kobi Michael, a former head of the Palestinian Desk at Israel's Ministry for Strategic Affairs, said Sinwar represents "one of the most radical and extreme lines of Hamas" and is focused on building up the group's military capabilities.

"The idea that he was elected is a very dangerous and concerning indication of the destabilization of the region," Michael said.