ISTANBUL — Ismail Haniya, the Hamas prime minister of Gaza, who is making his first official trip abroad since his Islamist movement took over the Palestinian strip in 2007, sought Monday to strengthen ties with the Arab and Muslim world in the wake of regional uprisings that have produced a rise in Islamist political strength.

Here in Turkey, where Mr. Haniya arrived after visiting Egypt and Sudan, he was quoted by the semiofficial Anatolian Agency on Monday as saying that “the Arab Spring is turning into an Islamic spring.”

Turkey, ruled by the Islamic-based Justice and Development Party, has grown close to Hamas and has downgraded its relations with Israel. In 2010, a group of ships and boats sailed from Turkey in an effort to break the Israeli naval blockade of Gaza, and Israeli commandos boarded the vessels to stop them. When they met with resistance, the commandos killed nine activists on board. Turkey has demanded an apology and compensation; Israel has refused.

Mr. Haniya visited the Mavi Marmara, the largest ship of the flotilla, on Monday and said, “The blood of Mavi Marmara martyrs and that of Palestinian martyrs is joined for a hopeful future.”