JERUSALEM — Prime Minister Recep Tayyip Erdogan of Turkey said on Friday that he planned to visit the Gaza Strip soon, a move that would significantly enhance the legitimacy of the Hamas-controlled Gaza government and antagonize the Palestinian Authority, Israel and the West.

Mr. Erdogan, who twice last year scheduled and then canceled visits to Gaza, did not offer specifics about the timing or agenda for such a visit, which he mentioned to reporters traveling with him to Ankara from Berlin, according to the Turkish newspaper Today’s Zaman. A Foreign Ministry official later said that the prime minister was simply expressing an “intention,” and that he wanted to visit “someday.”

Mr. Erdogan’s comments came nine days after the emir of Qatar became the first head of state to set foot in Gaza since Hamas took over in 2007, pledging $400 million for development projects, including housing complexes, road renovation and a prosthetics hospital. The crown prince of Bahrain was scheduled to visit the Palestinian enclave on Thursday but canceled at the last minute to avoid political repercussions, according to reports in the Arab news media.

A visit by the leader of Turkey, a huge power that is a member of NATO and a critical bridge between the West and the Islamic world, would make a much bigger diplomatic splash, paving the way for Egypt and other countries to expand direct, independent relationships with Hamas and further dividing the Palestinian leadership. Officials in the Palestine Liberation Organization and the Palestinian Authority, the Hamas rival that governs in the West Bank, had warned that the Qatari mission would set a dangerous precedent.