Pakistani Prime Minister Imran Khan arrived in Abu Dhabi on Wednesday night on his maiden foreign visit since coming to power, as Islamabad seeks to stave off a financial crisis.
The Pakistani leader was received by Sheikh Mohammed bin Zayed, the Crown Prince of Abu Dhabi and Deputy Supreme Commander of the Armed Forces, upon arrival in the UAE capital.
Saudi King Salman hosted Mr Khan earlier on Wednesday, state media said, before he travelled to the UAE.
On Thursday, a statement from Pakistan's foreign affairs ministry set out details of the discussions between Mr Khan and the Crown Prince.
"The Crown Prince congratulated Prime Minister Imran Khan on the peaceful transition of government in Pakistan and his election. He wished him success in the implementation of his reforms agenda", the statement read.
"The meeting discussed issues of regional and international dimensions, notably the fight against the spread of extremism and terrorism in the region and world by sustainable strategies to root out terrorism."
The ministry's statement also said that the "UAE confirmed to maintain its efforts for development work in Pakistan, and applauded the United Arab Emirates assistance to the Pakistani people through UAE Pakistan Assistance Program (UAEPAP)".
And Mr Khan and Sheikh Mohammed also spoke of the "contributions made by Pakistani professionals as well as skilled and unskilled labour", agreeing it was an "important component of the UAE’s success story".
He performed the Umrah pilgrimage early Wednesday morning after touching down in Saudi Arabia for his first state visit since taking office in August.
Mr Khan and his delegation prayed inside the Kabaa and a large number of Pakistani nationals living in the country congregated outside the holy site to see the new prime minister.
Mr Khan also met Crown Prince Mohammed bin Salman and energy minister Khalid al-Falih as he concluded his two-day visit, the Saudi Press Agency said, amid speculation that he would seek economic assistance from the oil-rich ally.
"Anyone who comes to power in Pakistan will visit Saudi Arabia first," Mr Khan told Saudi-owned Al-Arabiya television during his visit to the western city of Jeddah.
"Saudi Arabia has in the past helped Pakistan when Pakistan has been in need," he added.
When Mr Khan took his oath of office as Pakistan’s new leader last month, Sheikh Mohamed bin Zayed Al Nahyan, Crown Prince of Abu Dhabi and Deputy Supreme Commander of the UAE Armed Forces, phoned to congratulate him.
Both Islamabad and Abu Dhabi maintain close ties and there are more than one million Pakistanis in the UAE, which represent the second-largest national group in the country.
He arrived on the same day that Pakistan crumbled to 162 all out in their Asia Cup one-day cricket match against arch rivals India in Dubai. India were cruising to victory in their innings at the time of writing.
Former cricket great Khan, who assumed office one month ago, faces challenges including a faltering economy, militant extremism, water shortages and a rapidly growing population.
The most pressing is a looming balance-of-payments crisis, with analysts predicting Pakistan will have to go to the International Monetary Fund for a fresh bailout.
The IMF has bailed Pakistan out repeatedly since the late 1980s. The last time was in 2013, when Islamabad got a $6.6 billion loan to tackle a similar crisis.
Pakistani media has speculated that Khan is eyeing Saudi Arabia and China to provide loans to rescue Islamabad from the crisis and stave off another IMF bailout.
Mr Khan was accompanied to Jeddah by Foreign Minister Shah Mehmood Qureshi and Finance Minister Asad Umar, who met his Saudi counterpart Mohammed Al Jadaan.
The two finance ministers spoke about "financial and economic cooperation" between the two countries, SPA said in a brief statement.
His tour of the Gulf comes as a Pakistani court on Wednesday ordered the release of his political rival, former prime minister Nawaz Sharif and his daughter, suspending their prison sentences for corruption pending an appeal hearing.