Updated

U.S. Secretary of State Rex Tillerson sealed a deal Tuesday to intensify Qatar's counterterrorism efforts, tackling a central issue in the spat pitting the besieged Gulf nation against four other American allies lined up against it.

Tillerson outlined the agreement at the end of his first visit to Qatar since its neighbors moved to isolate it over grievances, including what they allege is its support for extremist groups.

It was his second stop on a shuttle-diplomacy circuit that will take him next to Saudi Arabia, which has shut Qatar's only land border and is the most powerful of the countries opposing it.

The centerpiece of the visit was the signing of a memorandum of understanding that lays out steps Qatar can take to bolster its fight against terrorism and address shortfalls in policing terrorism funding.

Tillerson said the deal, the details of which were not made public, has been in the works for a while and included some steps that have already been taken.

"Together, the United States and Qatar will do more to track down funding sources, will do more to collaborate and share information, and will do more to keep the region and our homeland safe," he said following talks with 37-year-old Emir Tamim bin Hamad Al Thani.

Tillerson also gave besieged Qatar some political backing ahead of his talks in Saudi Arabia on Wednesday. "I think Qatar has been quite clear in its positions and I think very reasonable," he said earlier in the day.

Though largely symbolic, the deal allows Tillerson to show some progress in his first major attempt at global mediation as secretary of state, and also bolsters President Donald Trump's claim to be ramping up the fight against terror financing.

The deal may also help Tillerson argue that Qatar is making a good-faith effort to address concerns and that Qatar's neighbors need to do the same.

Ahead of Tillerson's visit, U.S. officials worked vigorously to lower expectations, insisting that he did not expect an immediate breakthrough and cautioning that a resolution could take months. Wary of letting the U.S. be dragged into the middle of an intra-Gulf spat, Tillerson had avoided taking on a central mediating role, until it became clear that Kuwait-led efforts to resolve the crisis were stalled.

Sheikh Sabah Al Ahmed Al Sabah, the Kuwaiti emir who is mediating the dispute, said Tuesday he is "extremely concerned" about the crisis, and expressed "bitterness" over what he called "unprecedented developments," without elaborating.

Tillerson, a former oilman with years of experience in the region, began his Gulf visit Monday by meeting Kuwait's ruler, who has been acting as a mediator between Qatar and the quartet of Saudi Arabia, Bahrain, the United Arab Emirates and Egypt.

The four nations broke off relations with Qatar and cut air, sea and land routes with it more than a month ago. They later issued a 13-point list of demands to restore relations and gave Doha 10 days to comply.

The demands include Qatar shutting down news outlets including Al-Jazeera, cutting ties with Islamist groups such as the Muslim Brotherhood, limiting ties with Iran and expelling Turkish troops stationed in the country.

Qatar strenuously denies supporting extremist groups and has rejected the demands, saying that agreeing to them wholesale would undermine its sovereignty.

It does, however, at least indirectly support Islamist groups that other nations view as terrorist organizations, such as the Palestinian militant group Hamas. Qatar has hosted senior Hamas officials and is the largest financial patron to the Hamas-ruled Gaza Strip.

Underscoring that uneasy position, Qatari envoy Mohammed al-Amadi signed an agreement Tuesday with a Palestinian contractor to build eight residential buildings in Gaza. He said his country would continue to support development projects in the seaside territory — aid Qatar argues is for the Palestinian people rather than Hamas.

Tillerson's arrival in the Gulf coincided with the release by CNN of alleged agreements between Qatar and its neighbors dating from 2013 and 2014 the network says were leaked by a source in the region.

They include a handwritten 2013 deal between the leaders of Saudi Arabia, Kuwait and Qatar to not interfere in the internal affairs of fellow members of the six-nation Gulf Cooperation Council, which also includes Bahrain, Oman and the UAE.

That agreement specifically ruled out support for the Muslim Brotherhood and other unnamed groups that could threaten the bloc's members.

Qatar sees the Brotherhood as a legitimate political force and has for years hosted its spiritual guide, Sheikh Youssef al-Qaradawi. Saudi Arabia, the UAE and Egypt label the Brotherhood a terrorist organization.

None of the countries involved questioned the authenticity of the documents.

The four anti-Qatar countries said the leaked files "confirm beyond any doubt Qatar's failure to meet its commitments and its full violation of its pledges." Their 13-point list of demands in June was tied to those earlier deals and was "fully in line with the spirit of what was agreed upon," they said.

The head of Qatar's government communication office, Sheikh Saif bin Ahmed Al Thani, accused the quartet of undermining mediation efforts by leaking "selective excerpts" of the agreements and organizing "a smear campaign in the international media to damage Qatar's reputation."

"Their actions demonstrate that the blockading nations are not interested in engaging in honest negotiations to resolve our differences," he said, adding that Qatar was still open to talks to resolve the dispute.

The squabble puts Washington in an uncomfortable position militarily.

Qatar hosts al-Udeid Air Base, the largest U.S. military installation in the Middle East and hub for U.S.-led operations against the Islamic State group in Iraq and Syria. Bahrain is home to the U.S. Navy's Fifth Fleet, while American surveillance planes and other aircraft fly from the UAE.

___

Schreck reported from Dubai, United Arab Emirates. Associated Press writer Fares Akram in Gaza City, Gaza Strip, contributed to this report.

___

Follow Adam Schreck on Twitter at www.twitter.com/adamschreck and Maggie Hyde at www.twitter.com/maggie87h.