WASHINGTON - In the end it was a meeting in a nondescript conference room in Chicago that finally set in motion the long-awaited US apology to Pakistan last week, ending a seven-month impasse over NATO supply routes for the Afghan war.

The meeting in late May followed months of clamouring by Islamabad, images of flag-draped coffins on TV, and widespread outcry from Pakistanis incensed by the US air attack that killed 24 of their soldiers on the Afghan border last November.

The breakthrough, in which Islamabad reopened supply routes into Afghanistan and Washington yielded to months of Pakistani demands to apologise for the border deaths, was praised as a prelude to improved ties between two nations whose security alliance had lapsed into mutual suspicion and hostility.

After US Secretary of State Hillary Clinton's discussions with Pakistani President Asif Ali Zardari in the cavernous Chicago conference centre where world leaders met for a NATO summit, Clinton instructed Thomas Nides, a top deputy back in Washington, to do whatever it took to find a solution in ensuring NATO could once again supply the war in Afghanistan via Pakistan.

At the heart of last week's denouement was a carefully worded statement that allowed the United States to accommodate Pakistani indignation without opening US President Barack Obama up to criticism months before presidential polls.

Just as importantly, it aimed to avoid alienating those within Obama's government who had resisted apologising to a country many in Washington seen as acting to subvert US goals in the region, even while accepting massive US aid.

"A lot of people were holding their nose at the White House and the Pentagon at the notion of an apology," a US official said on condition of anonymity.

"The logic was that this was not a full-throated apology but that it was enough of a statement of regret, using terms associated with an apology, to get us across the GLOC finish line," the official said, using the acronym used for the supply routes, or Ground Lines of Communications, that Pakistan shut down after the 26 November border attack.