Nawaz Sharif of the Pakistan Muslim League (N) has been elected Pakistani prime minister, securing 244 votes in the 342-member National Assembly.
In his first address to the assembly, Sharif promised his government will construct a rail link from Kashgar in China's Xinjiang Uygur Autonomous Region to Gwadar Port on the Arabian Sea in southwestern Pakistan with Chinese help.
"This is my commitment, to complete this project in five years," he said.
Gwadar, 150 kilometers from the strategic Strait of Hormuz, has great commercial and strategic value and Pakistan and China have been working on a Kashgar-Gwadar rail, road and energy corridor for more than a decade and China has already revealed plans to set up massive underground oil depots at Gwadar, along with a refinery, to transport oil to Xinjiang.
He also said the Pakistani economy is in "indescribably bad" shape and sought cooperation from all political parties to overcome the "forest of problems" surrounding the country.
And he listed power blackouts, inflation, mounting debt, extremism, growing poverty and a poor image abroad as some of the problems facing his country as he takes office.
On corruption, he added, "I would not rest, not allow my team to rest. We would not tolerate corruption. I would not embezzle, nor allow anybody to embezzle."
"Beggars can never stand on their own feet," Sharif said, adding he envisions a "bright Pakistan where extremism, corruption, poverty and dictatorship are replaced with good governance."
In the voting for prime minister earlier Wednesday, Sharif's rivals Ameen Faheem of the Pakistan People's Party and Javed Hashmi of the Pakistan Tehreek-e-Insaf won 42 and 31 votes, respectively.
Sharif's candidature was also supported by several smaller parties in the National Assembly, including Muttahida Qaumi Movement and Jamiat Ulema Islam (F).
He also had the backing of nationalist parties from Baluchistan Province in southwestern Pakistan, where the rail plan is likely to help the economy.
Officials said President Asif Zardari will administer the oath to Sharif at the presidency Wednesday evening.
It is the third time Sharif has been elected as prime minister.
He was prime minister from November 1990-May 1993 and from February 1997-October 1999, but was not able to complete either term.
In 1993, he was sacked over corruption charges by President Ghulam Ishaq and in October 1999 Sharif's chief of Army Staff, Gen. Pervez Musharraf, overthrew the government in a bloodless coup.