Al Jazeera has been blocked in Saudi Arabia and the United Arab Emirates.

The website of the Qatari-owned international news broadcaster could not be accessed in either country on Wednesday. Al Jazeera confirmed it had been blocked, but gave no further details.

Saudi-owned TV channel Al Arabiya said its rival had been barred after the ruler of Qatar was reported to have described Iran as an "Islamic power" and criticized President Trump's policy towards Tehran.

Saudi Arabia and Iran are fierce rivals, and their proxies are fighting on opposite sides in wars in Syria and Yemen. Saudi Arabia broke off diplomatic relations with Tehran last year.

"There is no wisdom in harboring hostility towards Iran," Emir Sheikh Tamim bin Hamad Al Thani was quoted as saying in a report published by the official Qatar News Agency.

Qatar said its news agency had been hacked, and that the report quoting the emir was fabricated.

The country's communications ministry said in a statement that it had begun an investigation and that authorities would hold those responsible to account.

Qatar News Agency's website in English and Arabic could not be accessed on Wednesday.

Media regulators in Saudi Arabia and the UAE did not respond to requests for comments.

The spat between Qatar and its neighbors comes just days after Trump's visit to Saudi Arabia.

Trump was fiercely critical of Iran during a speech in Riyadh. He blamed the Islamic Republic for training terrorists and militias and said it was responsible for spreading "destruction and chaos across the region." He signed a huge weapons deal with Saudi Arabia.

Related: Who stands to lose if U.S. hits Iran with sanctions?

The disputed Qatar news agency report also described Hamas -- considered a terrorist organization by the U.S. and European Union -- as the official representative of Palestinians, according to Arabic media.

Qatar has hosted some senior Hamas figures, including Khaled Meshaal, who was leader of the group until earlier this month.

Relations between Qatar and other Gulf states cooled in 2014 over Qatar's foreign policy and its links to the Muslim Brotherhood, a political and social organization that calls for a society based on Islamic law.

Qatar gave refuge to Muslim Brotherhood leaders who fled Egypt in 2013 after Mohamed Morsi, a member of the Brotherhood, was ousted as president.

The Egyptian government revoked Al Jazeera's broadcasting license in 2011 amid unrest.