ISLAMABAD: Chinese President Xi Jinping kick-started $28 billion in infrastructure projects in Pakistan, in a visit meant to showcase deepening ties between the two countries.

Mr. Xi arrived Monday on his first state visit to Pakistan, where his government unveiled a massive infrastructure development program known as the China-Pakistan Economic Corridor.

Islamabad and Beijing have been close strategic allies for decades, based on their mutual antagonism toward India, but their economic ties had lagged behind.

On Monday, Mr. Xi finalized agreements or broke ground on $28 billion of advance projects out of the total $46 billion, ranging from upgrading Pakistan’s railways to building power plants, said Ahsan Iqbal, Pakistan’s planning minister.

“This is to show the seriousness—the reality—of the economic corridor,” Mr. Iqbal said.

At a ceremony in Islamabad, the two sides signed 51 agreements. From the capital, Mr. Xi and Pakistani Prime Minister Nawaz Sharif also performed a remote grounding breaking, via video link to the sites, on five projects, including a $1.4 billion dam close to Islamabad that will deliver 720 megawatts of electricity, and adding 900 megawatts to a solar power park at Bahawalpur, in the center of the country, for $1.5 billion.

“Friendship with China is the cornerstone of Pakistan’s foreign policy,” Mr. Sharif said after the ceremony. “Today, we have planned for the future.”

The program isn’t structured as traditional development aid. Chinese companies will carry out the work, which will be financed through either Chinese investment or concessional loans.

“I feel satisfied with the rich deliverables of the visit,” Mr. Xi said, according to a translation provided by Pakistani state television. “The building of the China-Pakistan corridor concerns, and has a bearing on, the national strategy [and] livelihoods of the two countries and their long-term development.”

The proposed economic corridor will connect the northwestern Chinese province of Xinjiang with the Pakistani port of Gwadar through a network of roads, and provide Pakistan with much-needed economic infrastructure, especially power-generation plants.

Pakistan’s acute electricity shortage leads to hours of daily scheduled power cuts to homes and businesses, holding back economic growth.

Beijing is concerned that without economic development and stabilization, Pakistan and Afghanistan would undermine security on China’s northwest flank. The economic corridor also aims to help economically develop the predominantly Muslim northwest region of China, by connecting it with Gwadar, a closer outlet than any Chinese coastal port.

A joint statement Monday said that the two sides will “continue working together to resolutely combat the terrorist organization, ETIM”, referring to the East Turkistan Islamic Movement, a militant Chinese Islamist group that has a refuge in Pakistan.

Of the $28 billion in advanced projects, most are expected to be completed by 2018, said Mr. Iqbal, the planning minister. These include a project to provide 1,320 megawatts of power at Port Qasim, in Karachi, 200 megawatts of wind farms in the southern province of Sindh, and coal-mining and coal-fired power plants at Thar, in Sindh.

In total, Mr. Xi’s visit will allow work to begin on providing 8,400 megawatts of power generation, with the construction of another 2,000 megawatts to follow in the short to medium term, said Mr. Iqbal.

An agreement to build a natural-gas pipeline connected to Iran was also signed Monday.

The Chinese-built power plants, if completed in time, would be enough to plug Pakistan’s existing electricity shortfall ahead of its next election, due in 2018. Pakistani Prime Minister Nawaz Sharif won office in 2013, partially on his promise to solve the country’s electricity crisis.

The Chinese transport projects include a $1.6 billion elevated mass transit railway for the eastern city of Lahore, Mr. Sharif’s hometown.

Mr. Xi will address a special joint sitting of both houses of Pakistan’s parliament Tuesday.

In total, the economic corridor project aims to add some 17,000 megawatts of electricity generation, at a cost of around $34 billion. The rest of the money will be spent on transport infrastructure, including upgrading the railway line between the port megacity of Karachi and the northwest city of Peshawar.

The plan calls for the completion of all the projects by 2030. Pakistan will establish a special security force of several thousand personnel to guard the Chinese projects against attacks by militants.

“Our cooperation in the security and economic fields reinforce each other, and they must be advanced simultaneously,” Mr. Xi said in a statement to the Pakistani media Sunday.