The United States and Qatar have signed a memorandum of understanding to fight terrorism in the Persian Gulf nation.

U.S. Secretary of State Rex Tillerson said Tuesday during his visit to the capital, Doha, that the agreement was signed after weeks of intensive discussions.

"The memorandum lays out a series of steps the two countries will take over the coming months and years to interrupt and disable terror financing flows and intensify counterterrorism activities globally," Tillerson told reporters after the signing.

Tillerson met with Foreign Minister Sheikh Mohammad al-Thani in the capital to discuss resolution of a dispute involving Qatar and four other Middle Eastern countries. Last month, Saudi Arabia, the United Arab Emirates, Bahrain and Egypt severed diplomatic ties and instituted a land, air and sea blockade of Qatar, accusing the country of supporting terrorism. Qatar denies the accusation.

Tillerson said he will visit Saudi Arabia Wednesday "to meet with the parties who are on the other side of this issue... to explore their feelings and explore options for how we might move this forward."

The secretary of state traveled to Qatar from Kuwait, which has been working to mediate the crisis, after meeting earlier Tuesday with Emir Sheikh Sabah al-Ahmed al-Sabah.

Tillerson's senior communications adviser, R.C. Hammond, said U.S. President Donald Trump has been very clear that his No. 1 goal is to have all Arab nations do more to stop the financing of terrorism. After his first trip abroad to Saudi Arabia as president, Trump accused Qatar of supporting terrorism at the highest levels.

Saudi Arabia, the UAE, Bahrain and Egypt have given Qatar a list of 13 demands, which include calls for Doha to downgrade its relations with Iran and close the Qatari-state-funded al-Jazeera news network. Qatar has said it is willing to negotiate, but will not give up its sovereignty.

Tillerson said, "I think Qatar has been quite clear in its positions and I think those have been very reasonable."

The U.S. is concerned the dispute could adversely affect its military and counterterrorism operations and enhance Iran's influence in the region.

Qatar is where the largest U.S. military facility in the Middle East is based and from which U.S.-led coalition aircraft launch attacks against Islamic State in Iraq and Syria.