Britain is to cut the time it takes to process visa applications by Pakistanis after a backlog delayed thousands.
Speaking after talks in Islamabad, UK Home Secretary Alan Johnson promised waiting times would fall from two months to 15 days by next month.
The Pakistani foreign ministry is embroiled in a row with the UK over several immigration issues, including delays in the award of UK visas.
Thousands of students hoping to study in the UK are among those affected.
UK Border Agency officials say 5,000 people are affected by the backlog in visa processing - mainly first-time applicants such as students. A further 9,000 appeals against visa refusals are pending.
The delays follow the re-location of the UK's visa office from Islamabad to Abu Dhabi in the United Arab Emirates - a move apparently made because of security concerns.
Pakistan says law-abiding citizens are being subjected to unacceptable delays.
Speaking after meeting Pakistani President Asif Ali Zardari and Prime Minister Yousuf Raza Gilani, Mr Johnson said moving the visa office was not in itself the cause of the problems.
"The fact is that it was taking us around 60 days to clear visas," he said.
"But it really has very little to do with moving the visa centre to Abu Dhabi... the problem here was a particular failing with new technology.
Pakistan's blind cricketers were unable to defend their title
"We are now down to between 14 and 28 days. Our objective is by November to ensure that we are providing the same services we aim to provide around the world... 15 working days from the time the application is made to the time it's produced.
"As far as the students are concerned, our understanding is that most universities in the UK have been flexible about this and have given a date to say look, we can still start your university course... by the end of October or early November."
The British home secretary also said the UK was "very keen to provide whatever expertise we can" to Pakistan to help it set up a national counter-terrorism agency.
He and UK Defence Secretary Bob Ainsworth are in Islamabad for talks with Pakistani officials on the role Pakistan plays in combating terror in the UK.
Over the past three months a blind Pakistani cricket team, a pipe band and a well-known popular musician have all been denied UK visas or experienced lengthy delays in getting them.
The situation came to a head when it emerged recently that thousands of prospective students seeking to embark on courses in the UK were affected.
One student, Razi Farooqui, told the BBC on Tuesday that he was unable to attend his masters course at Oxford University because his visa had still not been processed - despite being submitted in July.
"I feel highly aggrieved," he told the BBC, "because the delay has not only meant I will have to postpone my course for a year but also because the British authorities still have my passport and no-one seems to know what has happened to it.
"If I ring the high commission's offices in Karachi or Islamabad they refer me to their Abu Dhabi offices and when I ring that number there is no answer. I have yet to be given an explanation for the delay - it's mind-bogglingly incompetent, especially when I have frequently travelled to the UK over the last 10 years."
According to a Pakistani government spokesman, both Pakistani leaders urged the British authorities to expedite visa-processing applications.
The BBC's M Ilyas Khan in Islamabad says that students and applicants seeking medical treatment have suffered the most as many of them have missed crucial appointments at colleges and hospitals.
In addition, frequent visitors to the UK, such as musicians and businessmen, have also been denied visas.