Qatar's foreign minister, who has led a policy of opening contacts with Israel even while keeping close to Palestinian terrorists, was sworn in Tuesday as the Gulf nation's new prime minister. Sheik Hamad bin Jassem al-Thani was appointed to the post by the emir, Qatar's ruler, after his predecessor resigned, the state news agency said. Sheik Hamad, who will also retain the foreign minister position, has long been considered the architect of Qatar's maverick diplomacy, which sought to carve out a prominent role for the country despite its small size, effectively by dealing with all sides. In 2005, he met with Israel's foreign minister in New York, the first such public encounter between a high-level Gulf diplomat and Israel. Qatar is home to Israel's only diplomatic mission in the Gulf - a trade mission. In January, Deputy Foreign Minister Shimon Peres visited Qatar and held talks with the emir, who told Peres that Israel should negotiate with Hamas. Peres rejected the idea. Qatar, a US ally, has at the same time maintained close ties with Hamas, allowing its top leaders to maintain homes in the Gulf peninsula. It promised millions of dollars in aid to the Hamas-led Palestinian government, though the money was eventually given to Palestinian Authority Chairman Mahmoud Abbas, Hamas's rival, for distribution. Sheik Hamad tried to mediate between Hamas and Abbas's Fatah movement over the past year. But it was Qatar's rival, Saudi Arabia, which finally succeeded in brokering a unity government between the two movements in a summit in February. Qatar has also voiced support for the Lebanese terrorist group Hizbullah during its summer war with Israel at a time when Saudi Arabia and other US Arab allies were criticizing the guerrillas. Qatar has funneled millions of dollars in aid to Lebanon to help rebuild afterward. There was no official reason given for the resignation of the outgoing prime minister, Sheik Abdullah bin Khalifa Al-Thani, the emir's younger brother. But rumors have been rife in Doha for the past two months that such a move was in the works. Sheik Abdullah, who had held the post since 1996, was largely overshadowed by the stronger personality and higher profile of Sheik Hamad, a cousin of the emir. The new prime minister was sworn in Tuesday by the emir, Sheik Hamad Bin Khalifa Al-Thani. The rest of the 13-member Cabinet remained unchanged, except for the naming of a new state minister for energy and industrial affairs. Mohammed Salah al-Sada, the former managing director of the state-owned gas producer, was named to the post. Sheik Hamad had also held one of two deputy prime minister's posts. The reshuffle leaves only one deputy premier, Abdullah bin Hamad Attiyah who is also energy and industry minister. The changes came a day after the results were announced for Sunday's municipal council election, Qatar's third-ever democratic vote, which was seen as a precursor to parliamentary elections expected later this year to create the country's first national legislature.