If I remember correctly, Hamas was actually formed out of an Egyptian terrorist movement.
A number of Arab contries want Hamas to disarm, give their weapons to the Palestinian Authority, and end their rule of Gaza.
From
https://www.timesofisrael.com/liveblog_entry/qatar-saudi-arabia-egypt-sign-declaration-calling-for-hamas-to-disarm-leave-gaza-at-un-2-state-confab/Quote:
Arab countries, including Qatar, Saudi Arabia and Egypt, have signed onto a statement calling for Hamas to disarm and end its rule of Gaza, in a bid to end the devastating war in the Palestinian territory.
Seventeen countries, plus the European Union and Arab League, are throwing their weight behind a seven-page text agreed at a United Nations conference on reviving the two-state solution for Israel and the Palestinians.
"In the context of ending the war in Gaza, Hamas must end its rule in Gaza and hand over its weapons to the Palestinian Authority, with international engagement and support, in line with the objective of a sovereign and independent Palestinian State," says the declaration.
The text also condemns the deadly Hamas attacks against Israel on October 7, 2023, which launched the war.
Whenever a country takes in a sizable number of Palestinians, all the Palestinians are going to do is try to spread their terrorism to that country.
For example, look at Iceland. They took in some Palestinians and so the Palestinians started protesting that they need to bring in all of their relatives as well.