ISLAMABAD (AFP) - When Mr Misbah Rashid taught Chinese 30 years ago, few signed up. Today his department has more than 200 Pakistani students, increasingly attracted by the prospect of an affordable education and a job.
For decades, a foreign education was the preserve of the richest who could afford the stratospheric expense of sending their progeny to Oxford or Harvard to mingle with an international Westernised elite.
But Mr Rashid's pupils are mostly middle class. Ambitious and academic, they lack the means to afford an American or British education and so they sign up for Mandarin Chinese at the National University of Modern Languages in Islamabad.
Some of them hope to get a job with a Chinese company in Pakistan. Others will go on to further studies in China, which offers around 500 scholarships a year and cheaper fees.
A course in China costs a few thousand dollars a year, compared with the tens of thousands of dollars US and British universities charge. What is more, some Pakistanis say their great northeastern neighbour makes them feel more welcome.
"Nowadays as Pakistanis, you may not be as welcome in all other countries as we were a few years ago," says 18-year-old Ali Rafi, who applied to study economics at Shangdon University after visiting last summer.
"But when we went to China, there was one major difference in that we felt at home, the people relations were really, really good. We were always welcomed, honoured and everyone was really pleased when they learnt we were Pakistani."
He studies at City School, one of the private schools in Islamabad that has started to offer Chinese lessons to children as young as 12, who sing in Mandarin under the watchful eye of their teacher, Mr Zhang Haiwei.
If everything goes well, the classes will be rolled out across the school's other 200 branches in Pakistan. And other private schools are doing the same.
Pakistanis complain about the difficulty of getting visas and of the suspicion their nationality can arouse among those who associate Pakistan with Osama bin Laden, Al-Qaeda and the Taleban, particularly in Britain and the United States.
The British government says that overall, 20 per cent fewer student visas were issued in 2012, compared to the previous year.
The US mission in Pakistan says it supports the world's largest US government-funded exchange programme, sending over 1,000 Pakistanis on fully funded educational programmes to the United States every year.
The independent Institute of International Education says 5,045 students from Pakistan studied in the United States in 2010-2011, but that the number has declined steadily since 2001-2002, the academic year of the 9/11 attacks.
There is also considerable resentment of US policy, including the "covert" use of armed drones to carry out attacks in Pakistan on militants.
Whereas Chinese investment, China's reluctance to admonish Pakistan in public, its rivalry with India and status as an emerging global superpower give it considerable goodwill.
The job market is another consideration.
Pakistan's main trading partner is still the European Union, but trade with China reached US$12 billion (S$15 billion) last year, up 18 per cent from the previous year.
China is also Pakistan's main arms supplier. Beijing built two nuclear power plants in Pakistan and is contracted to construct two more reactors.
There are an estimated 10,000 Chinese living in Pakistan.
Last month, it also took control of Pakistan's strategic port of Gwadar, which through an expanded Karakoram Highway could connect China to the Arabian Sea and Strait of Hormuz, a gateway for a third of the world's traded oil.
Mushtak Ahmed, 19, has enrolled under Mr Rashid precisely because of the Chinese influx into Pakistan's northern province of Gilgit-Baltistan, where China is widening the highway to its border.
"Lots of Chinese people are coming to our area and they just speak Chinese and we cannot understand it... so there is a need for translators," he said.
According to Pakistan's embassy in Beijing, around 8,000 Pakistani students are already studying in China and thousands more are preparing to join them.
Former ambassador to Beijing and Washington Riaz Khokar said wealthy Pakistanis tend not to return after studying in the West, but China offers a technical education that will benefit the Pakistani economy.
"The Chinese economic presence in Pakistan is growing so why should there be Chinese managers or Chinese at various levels? The idea was (that) we should train."
China has accused the separatist East Turkestan Islamic Movement, which wants an independent homeland in the western Muslim-majority region of Xinjiang, of training "terrorists" in Pakistan, although experts question how much of a threat they are.
But the relationship has few of the tensions that Pakistan suffers with the United States, which repeatedly presses Pakistan to do more to clamp down on militants who launch attacks on American and Afghan forces in Afghanistan.
"I have dealt with their intelligence, I have dealt with their army, I have dealt with everybody at the highest level. They have never told us 'do this or we will kick you as the US does," said Mr Khokar.
But if political relations are cosy, then Haiwei says ordinary Chinese professionals are more circumspect.
"In Pakistan we have more than 6,000 Chinese students. However, we have maybe about 50 teachers. We don't have enough teachers. Some people found it dangerous so they don't want to work here," he said.