The Duke of Cambridge has stressed the importance of security in Pakistan in keeping people safe on “the streets of the UK”.

William and Kate had their Friday itinerary rearranged after a flight from Lahore to Islamabad on Thursday had to turn back due to a “pretty serious storm”.

The couple were able to visit an army canine centre as previously scheduled on the last day of their five-day tour, which was due to focus on security.

Royal visit to Pakistan – Day Five
The Duchess of Cambridge, with Captain Aqeel of the Pakistan Army (centre) and Belgian Malinois dog Tutu, during a visit to the Army Canine Centre in Islamabad (Chris Jackson/PA)

But they missed flying over the Khyber Pass – on the border with Afghanistan – because of the unexpected overnight stay in Lahore.

William told reporters at the centre that learning about security in the region had emphasised the importance of the relationship between the two nations.

“A lot of effort, a lot of lives being lost by the Pakistanis in securing large parts of this country over the years and those sacrifices for the Pakistanis should be acknowledged,” he said.

“It’s been a huge, huge undertaking for them.

“The fact that we’re here today and witnessing UK-Pakistani security working together shows you how important it is and that, actually, what happens here in Pakistan directly correlates to what happens in the streets of the UK.”

The duke continued: “I think it’s really important that everyone back home in the UK realises that we have a far-ranging, far-reaching projection of what we’re doing and we’re involved with the Pakistanis for a very good reason.

“It will actually keep people safe back in the UK.

“What happens in Pakistan directly correlates to what happens back in the UK.”

Three of the attackers in the 7/7 bombings in London in 2005 – targeting commuters on public transport – were of Pakistani descent.

The attack on three Tube trains and a bus killed 52 people and injured more than 700 others.

Royal visit to Pakistan – Day Five
The Duke and Duchess of Cambridge with golden Labrador puppies Salto and Sky (Chris Jackson/PA)

William and Kate walked two golden Labrador puppies, called Sky and Salto, which are being trained as search dogs.

British troops are currently supporting the Pakistan Counter Improvised Explosive Device (CIED) programme, which in part breeds and trains dogs to identify explosive devices.

It is modelled on the UK Defence Animal Training Centre at Melton Mowbray.

Home-made bombs and suicide attacks in Pakistan have killed thousands during the country’s battle with militancy and extremism.

The couple had an unexpected stay at the Pearl Continental Hotel on Thursday night following two aborted landings by the RAF Voyager pilot.

Lightning strikes could be seen near the right wing as the plane shook with heavy turbulence.

William, who went to check on travelling media, made a reference to his time as an air ambulance pilot, joking: “I was flying!”

“I think it was quite an adventure really, it was pretty bumpy up there,” the duchess told reporters on Friday.

“But we were looked after so wonderfully by the RAF, who did a great job liaising with everyone and got us home safely, so we are hugely grateful to them.”

Surprised guests at the five-star hotel.were treated to a glimpse of the royal couple on Friday morning as they left.

A crowd gathered in the foyer as William and Kate embarked on the last day of their tour.

Their visit to a military post in the Khyber Pass was called off due to a lack of time after the overnight stay.

It would have involved a security briefing from the Khyber Rifles, highlighting improved relations between Pakistan and Afghanistan.

The duke and duchess spent Thursday daytime exploring Lahore, visiting the Badshahi Mosque and the Shaukat Khanum Memorial Cancer Hospital and Research Centre.