ISLAMABAD, PAKISTAN :  After years of flat direct foreign investment, it has taken China’s pledges of billions to get overseas companies to start looking beyond Pakistan’s negative headlines on security challenges and power outages.

While investment into Pakistan has been little changed in the three years since Prime Minister Nawaz Sharif was elected, companies including Turkey home appliances maker Arcelik AS and Dutch dairy giant Royal Friesl and Campina NV are making acquisitions in Pakistan.

Along with a military crackdown against militants following a 2014 school massacre and the government’s plans to end power shortages by 2018, it is China’s vote of confidence in the country that has boosted investor confidence. It pledged $46 billion in soft loans and investments in a so-called China-Pakistan Economic Corridor, or CPEC, announced last year.

“Pakistan has turned the tide,” said Mattias Martinsson, the Stockholm-based chief investment officer at Tundra Fonder AB, which holds about $160 million in Pakistani stocks. “The CPEC agreement was probably the trigger for many investors to actively start looking. We all know China does not take short term decisions, he was quoted by Bloomberg TV channel.