Investigation launched into security breach by hackers who posted fake reports on the national news agency's platforms.

Qatar has begun an inquiry into a security breach by hackers who posted fake remarks on its national news agency's platforms by its ruler purportedly criticising US foreign policy.

The incident comes just days after President Donald Trump met Gulf Arab leaders in Riyadh, Saudi Arabia.

"The Qatar News Agency (QNA) website has been hacked by an unknown entity. A false statement attributed to His Highness has been published," a government statement early on Wednesday said.

Qatar will track down and prosecute the perpetrators, the statement said.

In addition, the hacked Twitter account contained a false story in Arabic apparently from the country's foreign minister, Mohammed bin Abdulrahman Al Thani, about Qatar withdrawing its ambassadors from several nearby countries.

An official in the Qatari foreign ministry expressed "surprise at the position of some media and satellite channels".

Authorities in Saudi Arabia and the UAE blocked the main website of Al Jazeera late on Tuesday.

Regulators and government officials in the UAE did not respond to media requests for comment.

Al Jazeera has said it is "studying the reports our channels and digital platforms have been blocked in certain countries in the region".

The Doha-based media network has maintained that it is an independent news service giving a voice to everyone in the region.

The fake report said Sheikh Tamim, in a speech at a military-graduation ceremony, was critical of renewed tensions with Iran, expressed the need for contextualising Hezbollah and Hamas as resistance movements, and suggested that Trump might not last long in power.

Reuters news agency quoted a Qatari government spokesman as saying that while Sheikh Tamim had attended a graduation ceremony for Qataris doing national service, he "however did not make any speech or give any statements".