General Qamar Javed Bajwa, the Pakistani chief of army staff, was due to retire in November after completing his stipulated three-year term.

Bajwa "is appointed Chief of Army Staff for another term of three years from the date of completion of current tenure. The decision has been taken in view of the regional security environment," said an official announcement. The widely expected move also comes at a time when negotiations between the United States and the Taliban to end America's longest war in Afghanistan are said to have entered a decisive stage.

Bajwa, whose institution is accused of covertly maintaining ties with the Taliban, is credited with arranging the year-long Afghan peace process to promote political reconciliation in the neighboring country.

U.S. officials say the cooperation has helped reset traditionally troubled relations between Washington and Islamabad. President Donald Trump, while speaking to reporters Sunday, acknowledged this.

"We have a great relationship with Pakistan now," Trump said, adding that he had "a really good" meeting with Khan when he visited the White House on July 22.

Bajwa also accompanied the Pakistani prime minister in last month's visit to Washington.

Tightened restrictions

Tensions between Pakistan and India began to escalate two weeks ago when Prime Minister Narendra Modi scrapped the limited autonomy for New-Delhi-administered part of Kashmir. The action was accompanied by a strict curfew and an unprecedented communication blackout to discourage a violent reaction from the local population.

Islamabad has denounced the actions and demanded New Delhi lift the restrictions, alleging they are aimed at enabling Indian security forces to inflict massive human rights abuses on the Kashmir population.

Pakistan also controls a portion of the divided region known as Azad (independent) Kashmir. Both countries claim Kashmir in its entirety, and have fought two wars over the region, while skirmishes across the de facto Kashmir border, known as Line of Control, have become almost a daily routine.

Embattled government

Analysts said the extension given to Bajwa will likely help stabilize Khan's embattled one-year-old government, which faces serious political and economic challenges in addition to the external pressures.

Political opposition parties have been protesting the government's anti-corruption drive and threatening to take to the streets in their bid to remove Khan from power.

Unlike previous successive governments, Khan's administration has developed a rare close relationship with the powerful military under Bajwa's leadership.

Relations between the two state institutions have traditionally been fraught with tensions, often leading to abrupt dismissals of elected governments and direct military coups in Pakistan.

Bajwa's counter-terrorism measures and an intensified campaign against domestic Islamist militancy have also won him praise at home and abroad, say observers.