Geoffrey Douglas Langlands, a British officer who remained in Pakistan after the end of colonial rule in India and became one of the country's most respected educators, has died in the eastern city of Lahore.

He was 101.

The "Major", as he was known, passed away on Wednesday after "a brief illness", according to a statement by the Lahore-based Aitchison College, where Langlands served as the headteacher of a preparatory school.

Langlands taught English and mathematics for more than six decades in Pakistan, and lived long enough to see one of his students, Imran Khan, become the country's prime minister.

In a statement on Twitter, Khan, who took office in August 2018, said he was "saddened" by Langlands' death.

"Apart from being our teacher, he instilled the love for trekking and our northern areas in me," he said.

2012101516347715708

Langlands was born on October 21, 1917 in Yorkshire, England. He briefly worked as a teacher in Croydon before joining the British army when World War II broke out in 1939.

After the partition of the Indian subcontinent, Langlands volunteered to remain in Pakistan to train the country's army.

In 1954, he began teaching at Aitchison College, one of the most reputed colleges in the country, at the request of then-President General Ayub Khan.

In the late 1970s, he took up the headteacher's job at the Razmak Cadet College in Waziristan, located near the Afghan border. He was briefly abducted in 1988 and held for six days by tribesmen in the area.

Speaking of Langlands' kidnapping, a former student, Ali Sabtain said: "Langlands used to tell us how he walked faster than the kidnappers up the mountainous areas."

"They were not able to catch up, this is how energetic and full of life he was," added Sabtain, who works as a senior advocate at the Supreme Court of Pakistan.

'Service beyond compare'

The year after the abduction, Langlands took over the role of headteacher at the Sayurj Public School in the city of Chitral in northwestern Pakistan. He raised funds to buy land for the school and expand it.

The institution was renamed after him as the Langlands School and College. He served there until the age of 95.

His former students remember him as a great friend, humanitarian and a passionate storyteller with a remarkable memory.

"He was like a father to us, he was there for his students and looked after them," said Nadeem Mumtaz, a former student at Aitchison College.

"His teaching methods were very empowering, many of his students are now high-profile professionals [in Pakistan]. Langlands contributed to his students' higher education even after he retired. His service to Pakistan is beyond compare," Mumtaz said.

In 2013, Langlands returned to Lahore and took up residence at Aitchison College. Four years later, in 2017, a few days after he celebrated his 100th birthday, the respected teacher had a major stroke that affected his ability to speak.

The former headteacher was awarded two of Pakistan's highest civilian awards for his service in the country's education sector.

Many Pakistanis took to social media on Wednesday to express grief over Langlands' death and to pay tribute to him.

Saddened to learn of the passing of my teacher. Apart from being our teacher, he instilled the love for trekking and our northern areas in me - before the KKH was built. (I was 12 years old in the school picture) pic.twitter.com/cgH4glWIDR — Imran Khan (@ImranKhanPTI) January 2, 2019