Media playback is unsupported on your device Media caption People in Balochistan remain sceptical that Chinese investment in Pakistan will help them, as Shahzeb Jillani reports

China's President Xi Jinping has signed agreements with Pakistan promising investment of $46bn (£30.7bn).

The focus of spending is on building a China-Pakistan Economic Corridor (CPEC) - a network of roads, railway and pipelines between the long-time allies.

They will run some 3,000km (1,800 miles) from Gwadar in Pakistan to China's western Xinjiang region.

The projects will give China direct access to the Indian Ocean and beyond.

This marks a major advance in China's plans to boost its influence in Central and South Asia, correspondents say, and far exceeds US spending in Pakistan.

Image copyright AP Image caption PTV broadcast the historic signing and exchanging of agreements between the two countries

"Pakistan, for China, is now of pivotal importance. This has to succeed and be seen to succeed," Reuters quoted Mushahid Hussain Sayed, chairman of the Pakistani parliament's defence committee, as saying.

Pakistan, for its part, hopes the investment will strengthen its struggling economy and help end chronic power shortages.

Pakistani Prime Minister Nawaz Sharif said ties with China had "remained robust" despite political changes and "major regional developments" over four generations.

"Our relations are based on the shared ideals and principles of mutual trust, mutual benefit and mutual respect," he said.

Analysis: M Ilyas Khan, BBC News, Islamabad

Is Pakistan on the verge of becoming the Asian Tiger Prime Minister Nawaz Sharif said it would become when he was last in power in 1997?

China plans to inject some $46bn - almost three times the entire foreign direct investment Pakistan has received since 2008. Many say Mr Sharif's penchant for "thinking big" and China's increasing need to control maritime trade routes may well combine to pull off an economic miracle in Pakistan.

But there are questions over Pakistan's ability to absorb this investment given its chronic problems with militancy, separatism, political volatility and official corruption.

China is worried about violence from ethnic Uighurs in its mostly Muslim north-western Xinjiang region and fears hard-line separatists could team up with Uighur militants fighting alongside members of Pakistan's Taliban.

In Pakistan, a decade-old separatist insurgency in Balochistan province, where the economic corridor starts, makes that area extremely volatile. Many observers believe however that the incentive of an economic miracle may make Islamabad work harder to stabilise the situation.

China prestige projects around the world

Mr Xi will spend two days holding talks with his counterpart Mamnoon Hussain, Mr Sharif and other ministers.

He was expected to discuss security issues with Mr Sharif, including China's concerns that Muslim separatists from Xinjiang are linking up with Pakistani militants.

"China and Pakistan need to align security concerns more closely to strengthen security co-operation," Mr Xi said on Sunday.

Under the CPEC plan, China's government and banks will lend to Chinese companies, so they can invest in projects as commercial ventures.

Some $15.5bn worth of coal, wind, solar and hydro energy projects will come online by 2017 and add 10,400 megawatts of energy to Pakistan's national grid, according to officials.

A $44m optical fibre cable between the two countries is also due to be built.

Image copyright Reuters Image caption Mr Xi will hold talks with Pakistan's president and prime minister

Pakistan, meanwhile, hopes the investment will enable it to transform itself into a regional economic hub.

Ahsan Iqbal, the Pakistani minister overseeing the plan, told AFP news agency that these were "very substantial and tangible projects which will have a significant transformative effect".

Pakistan's neighbour and rival, India, will be watching developments closely. Delhi is wary of China's regional ambitions, despite relations improving markedly in recent years.

President Xi visited Delhi last year, after postponing his visit to Islamabad because of anti-government protests. India's Prime Minister Narendra Modi is due in China next month.