KABUL—Afghan government officials and Taliban representatives met in Pakistan on Tuesday, Afghan, U.S. and Pakistani officials said, signaling a possible start to a formal peace process.

The meeting, which took place in Murree, a hill station outside Islamabad, was one of the highest-level contacts between the two warring parties in recent years, offering hope that a formal peace process aimed at ending the long-running conflict could soon begin.

U.S. and Chinese officials took part in Tuesday’s meeting as observers, Afghan and Pakistani officials said. Their attendance, together with Pakistan’s willingness to host the meeting, points to a broadening involvement of key players in possible peace negotiations.

Pakistan’s Foreign Ministry in a statement on Wednesday said the two parties would meet again after the Islamic holy month of Ramadan ends in two weeks. “The participants agreed to continue talks to create an environment conducive for peace and reconciliation process,” it said.

Obama administration officials said they saw the meeting as a tentative first step in a process with an uncertain future. Most encouraging, the officials said, was the fact that the Taliban agreed to direct talks with the Afghan government. The Taliban’s refusal to talk directly to the Afghan government has been a major sticking point in the past to getting negotiations off the ground.