The Duke and Duchess of Cambridge made a colourful entrance as they arrived by auto rickshaw for a special reception hosted by the British High Commissioner to Pakistan in Islamabad.
Kate wore a glittering green dress and William a traditional sherwani suit for the event at the Pakistan Monument.
The royal pair are on a five-day tour of the country.
Earlier, they met schoolchildren and had lunch with Prime Minister and former cricket star Imran Khan.
At the reception, which was arranged to showcase the best of Pakistani culture, the duke recognised the country's troubled past, saying: "For a country so young, Pakistan has endured many hardships, with countless lives lost to terror and hatred.
"Tonight I want to pay tribute to all those who have endured such sacrifice and helped to build the country that we see today."
And he promised Pakistan could rely on Britain as "a key partner and your friend".
Guests at the reception, hosted by the High Commissioner, Thomas Drew, also included figures from Pakistan's business, music and film industries, as well as members of the government.
The couple are the first royals to officially visit the Commonwealth country since the Prince of Wales and Duchess of Cornwall visited the region in 2006.
'Big fans of Diana'
In Pakistan, Prince William is also following in the footsteps of his mother Diana, Princess of Wales, who went there on several charity work trips before her death in 1997.
On a visit to the Islamabad Model College for Girls, the couple spoke to children, including 14-year-old Aima, who told him she and her classmates were "big fans" of his mother.
"Oh, that's very sweet of you. I was a big fan of my mother too," the duke said.
"She came here three times. I was very small. This is my first time and it is very nice to be here and meet you all," he added.
The duke and duchess heard how pupils were benefiting from the Teach for Pakistan programme - a fast-track teacher training scheme modelled on the UK's Teach First scheme.
The British High Commission said UK aid in Pakistan had helped more than 5.5m girls receive a quality education since 2011.
Local education officer, Mohammed Sohailkhan, told reporters the quality of education for girls varied across Pakistan.
"I can't paint you an entirely rosy picture," he said. "It does still fluctuate wildly, particularly in rural regions, where there has traditionally been cultural barriers towards this, notably in terms of sending girls away to college. But these barriers are slowly being broken down."
The prince and his wife also visited the Margalla Hills National Park in the foothills of the Himalayas, before travelling to Mr Khan's official residence in Islamabad for a private lunch.
Mr Khan, a former international cricketing star and now PM, was a friend of the prince's mother.
Prince William and Mr Khan reminisced about meeting each other when the duke was a boy at a gathering in Richmond, south-west London, in 1996.
The duke told how everyone laughed at the time, when Mr Khan announced his ambition of becoming prime minister to William and his mother Diana, Princess of Wales.
What are William and Catherine doing here in Pakistan? Put simply they are spreading a little royal love around the place.
It's been 13 years since a royal visit. Some of those have been very tough years for Pakistan, a country that Britain has strong and long historical links with. Around one-and-half million British citizens are of Pakistani descent. Part of the visit is about giving the country a royal hug and showing people here that Britain cares.
It's also a way of highlighting joint interests - climate change threatens Pakistan more than most, early years education is one of the duchess's biggest single concerns, and security is a key part of the co-operation between the UK and Pakistan.
And it is a way of selling Pakistan to the world. The duke and duchess will leave the cities and see something of the spare and rugged countryside.
Yes, there's lots of security surrounding the couple. But their travels will also advertise the breathtaking beauty of Pakistan, alongside the bustling cities. It is an opportunity to learn, to encourage and to give something back.
The five-day trip was organised at the request of the Foreign and Commonwealth Office.