Saudi Arabia has said it is reopening its border with Qatar to let pilgrims attend the hajj, marking a breakthrough in a months-long rift between the two Gulf countries.
Qatari pilgrims will be allowed to enter the kingdom by land and pilgrims will then be flown onward from two Saudi airports in Dammam and al-Ahsa at the king's expense, the official Saudi Press Agency reported.
The king also ordered that aircraft be dispatched to Qatar's capital, Doha, to fly Qatari pilgrims to the Red Sea city of Jiddah - nearest to Mecca - and to host them at his expense for the hajj.
The decision came after Saudi Arabia's Deputy Crown Prince Mohammed bin Salman met with Qatari royal family member Sheikh Abdullah bin Ali Al Thani in Jiddah late on Wednesday.
Images broadcast on Saudi media showed the two princes seated and smiling for cameras.
Mr Al Thani was quoted as telling the Saudi prince that the ties between the two countries "are brotherly relations rooted in history".
Saudi Arabia's crown prince responded in kind, according to the Saudi Press Agency.
The meeting in Jiddah was the first by a Qatari emissary to Saudi Arabia since a tense political stand-off erupted 10 weeks ago when the kingdom, the United Arab Emirates, Bahrain and Egypt severed ties with Qatar.
The quartet also halted direct flights, expelled Qatari residents and ordered their citizens in Qatar to leave.
Saudi Arabia sealed Qatar's only land border.
Despite the goodwill measure announced on Thursday, tensions remain.
The quartet accuses the small Gulf nation of supporting extremists.
Qatar denies the allegation and says the charges are politically motivated.
At issue is Qatar's support for Islamist opposition groups in the region, which Saudi Arabia, the UAE and Egypt view as a threat.
A top Emirati official, commenting on Thursday's breakthrough, called on Qatar to "end its politicisation of hajj".
UAE minister of state for foreign affairs Anwar Gargash also used the opportunity on Twitter to commend Saudi Arabia for the initiative to send planes.
Hundreds of thousands of pilgrims from around the world have already arrived in Saudi Arabia for the hajj, which begins late next week.
Saudi Arabia prides itself on hosting millions of pilgrims annually at Islam's holiest sites in Mecca and Medina.
Qatar had previously filed a complaint with the UN special rapporteur on freedom of belief and religion over restrictions placed on its nationals who wanted to attend the hajj this year.
Saudi Arabia's foreign minister Adel al-Jubeir responded to Qatar's complaint, saying it amounted to a "declaration of war" against the kingdom's management of the holy sites.