An investigation into the hacking of the state-run Qatar News Agency (QNA) website has revealed the involvement of two nations blockading Doha, Qatar's foreign minister has said, as he vowed legal action.

In an interview on Qatar TV on Wednesday, Sheikh Mohammed bin Abdulrahman Al Thani said a probe that began in May provided evidence that two countries were involved in the hacking of the country's state news agency website and its social media accounts, but did not specify any names.

On May 23, 2017, alleged hackers reportedly posted fake remarks on Qatar's official media platform criticising US foreign policy and attributing the statement to the country's emir.

Following the publication of the stories, Saudi Arabia and the UAE blocked the Qatar-based websites including Al Jazeera, and later led a group of Arab countries including Bahrain and Egypt in cutting diplomatic and trade ties with Doha.

In the articles, Qatar's Emir Tamim bin Hamad Al Thani was quoted as cautioning against confrontation with Iran, as well as defending the Palestinian group Hamas and Hezbollah, a Lebanese Shia movement allied with Tehran.

Qatar's government has categorically denied posting the comments.

"The state of Qatar does not rely on leaks or news stories that do not bear evidence about the state that committed the crime of hacking and the investigation proved that the two states were involved in the crime," said Al Thani.

Qatar's government has previously said that that there was proof the QNA hacking was linked to the blockading nations.

Doha also accused the UAE of violating international law after reports suggested that Abu Dhabi orchestrated the hacking.

Qatar sought the help of the US Federal Bureau of Investigation to investigate the source of the cyberattack.

UAE dispute

Saudi Arabia, the UAE, Bahrain and Egypt severed diplomatic relations and cut off land, air and sea links with Qatar on June 5, accusing it of supporting "terrorism" and advancing the agenda of their regional rival, Iran. Doha strongly denies the charges.

Kuwait has led the mediation efforts with Turkey and the US also visiting the region to try to resolve the dispute.

In his interview with Qatar TV, Qatar's deputy prime minister said that there was a point of disgareement with the UAE two months prior to the blockade

While addressing some media attacks from the UAE, Qatar was asked to hand over the Doha-based wife of an Emirati dissident who left Abu Dhabi five or six years ago and moved to Britain, Al Thani said.

{articleGUID}

UAE envoys had made a similar request with Qatar's emir in 2015, but Shekih Tamim refused.

"It is in our morals and traditions as Arabs that we cannot hand over women, and the issue of refugee culture is rooted in our history," the foreign minister told Qatar TV.

He added: "We assumed then the UAE's understanding of this step. The emir told them that we will not allow anyone to use Doha as a platform to attack the UAE or any Gulf country.

"We have fulfilled this promise before the matter was reopened in light of the attacks that were observed when we raised this issue, and they asked us to hand over the woman in return for ending the media attacks."

Qatar has begun seeking international arbitration in an attempt to end the blockade imposed on it.