As U.S.-funded Afghan jihadists battled the Soviets in the late 1980s, the unassuming American-run bar in this ancient frontier city bulged with gossiping foreigners. Today, with another Afghan conflict winding down, the watering hole practically echoes with emptiness.

Through it all, Khan Afsar, the Khyber Club’s unlikely bartender, had a front-row seat.

Except Afsar did not actually have a seat in his spot behind the bar, and all the standing recently became too much to bear. So he has stepped down after nearly 25 years of six-day workweeks that he says left him with admiration for Americans, a rare sentiment in Peshawar and in Pakistan at large.

“They are good people” — not to mention good tippers, Afsar said. “They are helping us.”

As a recent Saturday evening shift began, a lone Canadian patron sipped beer at the bar and predicted that the crowd was unlikely to improve. The scene seemed a metaphor for U.S.-Pakistan relations, which boomed with cooperation during the Afghan resistance but now gape with mistrust.

Yet Afsar himself is a symbol of the ground-level relations between Americans and Pakistanis, which, despite the diplomatic tensions, are typically far more amiable than sour. Over the decades, Afsar — a devout Muslim who never tried alcohol — served as a steadfast and good-natured ambassador for Pakistan, building a trail of admirers now scattered around the globe.

“For a modest fellow from a mountain village . . . he supervised and served the foreign lunatics with kindness, merriment and unflappable aplomb,” Stephen Masty, who managed the bar in the early 1990s, wrote in an e-mail.

The club, then called the American Club, was launched in 1985 as a guesthouse for visiting U.S. officials. Peshawar swirled then with aid workers, missionaries, journalists, spies and diplomats working the sidelines of the Afghan war. One of the club’s neighbors was Osama bin Laden — a wealthy young Saudi who was funding mujaheddin fighters.

According to one American official there at the time, the club’s founders decided it needed a “discreet” bar, because then, as now, alcohol was mostly prohibited in Pakistan. Foreigners soon flocked to the club for drinks, cheeseburgers, music and aerobics on the terrace. But the big draws were tales from “inside,” as Afghanistan was known, said Robert D. Kaplan, a former patron who is now a national correspondent for the Atlantic magazine.

Afsar donned his bartender’s waistcoat in 1987, after a few years waiting on Americans working at a dam project in northern Pakistan. It was a solid gig, he said, for a man whose growing family lived a few hours away near Abbottabad, the city where bin Laden would be killed by Navy SEALs 24 years later. For safety’s sake, though, Afsar told only relatives where he worked.

He memorized the ingredients for B-52s and Manhattans from a book, and as Afghan fighters downed Soviet aircraft with CIA-funded Stinger missiles, Afsar’s stinger cocktail — creme de menthe and brandy — became famous from western Pakistan to the Chinese border, Masty said. The man behind those missiles, the late U.S. congressman Charlie Wilson, preferred Johnnie Walker on the rocks, Afsar said.

“If I see a face, I remember it,” said Afsar, explaining that he no longer recalls all the notables he served. “Here, every customer is famous.”

Though U.S.-Pakistan relations ebbed after 1990, the club kept up, and so did Afsar, always adhering to his daily prayer schedule. The bar expanded. The tennis court was replaced by a swimming pool.

Things began changing about five years ago, as Islamist militants expanded their reach and launched attacks in northwest Pakistan. Hostility toward Americans rose, and many international organizations withdrew foreign workers to Islamabad, the capital. The club’s security walls multiplied, and more American customers sported beards and tattoos, said Yusuf Ghaznavi, a Pakistani American who has been a fixture at the club for two decades.

“I presume they were contractors,” Ghaznavi said. “Their main concern was A, how soon they are going to get out, and B, how much money they are making.”

As bilateral tensions soared, Pakistan ordered the departure of most U.S. military representatives, many of whom had been based in Peshawar. The American mission in Peshawar now has a skeleton staff whose security guidelines prohibit much movement in the city.

Against that backdrop, the club has become more of a lifeline, recent patrons said. Three U.S. troops who were killed in a roadside bombing in northwest Pakistan in 2010 were mourned at the Khyber Club, said one U.S. diplomat stationed there then. Afsar also served as a lifeline, the diplomat said — a historian and a middleman who could always fulfill orders for the perfect Pakistani carpet or shawl.

When patrons learned two years ago that Afsar’s wife was ill, they held a fundraiser at the club.

“It’s the only time I saw his tears,” the diplomat said.

Afsar dismisses the plaudits, saying he just did his job. He insists the work never brought him threats from militants or hounding from Pakistani intelligence.

A few months ago, a motorcyclist accidentally struck Afsar while he walked to work. The injuries were not severe, but Afsar said they made him too weak to tend bar. He misses it, he said, sitting at a round table near stacks of board games and DVDs while his replacement slid open the liquor cabinet.

“It’s a little boring now that I am retired,” said the father of eight and grandfather of six.

Afsar, a witness to decades of globe-shaking history, would hazard no guess about the future of the club or Afghanistan. U.S.-Pakistan relations, he thinks, will soldier on.

“This is government policy,” he said. “This is not my job. We are poor people. We are just looking for work.”