KABUL, Afghanistan — Today, they are representatives of three central parties to the Afghan war, caught up by a frenzied effort to find an endgame to decades of violence.

But during the last stretch of peace their generation has known, in the 1970s, the three young Afghans — Ashraf Ghani, Zalmay Khalilzad and Sher Mohammed — were all busy finding themselves while studying on scholarships abroad.

During those years, Mr. Ghani and Mr. Khalilzad, now the Afghan president and the chief American peace envoy, were completing degrees in Lebanon at the American University in Beirut, a vibrant hub of ideologies and intellects during a turbulent time in the Middle East. They enjoyed the Mediterranean beaches, went to dances and met their future wives.

The third Afghan, now known as Sher Mohammed Abas Stanekzai, the chief negotiator for the Taliban, spent those years in military fatigues at the foothills of the Himalayas, training at India’s most prestigious military schools. On breaks, his batch of young Afghans would find themselves in the hills of Kashmir, or on the sets of Bollywood films hoping for a photo with the stars.