Wen, who arrived in Islamabad on Tuesday, signed a "treaty of friendship, cooperation and good neighbourly relations", according to Salman Bashir, Pakistani ambassador in China who briefed reporters about talks between the two leaders.
At a meeting with his Pakistani counterpart Shaukat Aziz in Islamabad, the Chinese leader also lent Beijing "full support" in helping resolve issues with Pakistan's rival neighbour India - including efforts to settle the decades-long dispute over the divided region of Kashmir, Bashir said.
China is a long-time supplier of defence equipment to Islamabad. Wen's visit came a day after defence officials from the two sides signed a deal under which Pakistan will buy four warships from China.
On Tuesday, China and Pakistan in the presence of Wen and Aziz signed 22 agreements to enhance cooperation in the areas of defence, trade and economic relations inter alia.
Although China also shares a border with India and that the two nations went to war in the early 1960s, they have recently taken steps to improve relations.
Beijing has been encouraging Pakistan and India to resolve their disputes, including Kashmir, through bilateral talks and negotiations.
Kashmir is divided between Pakistan and India but each country claims the region in its entirety. They have fought two wars over Kashmir since their independence from British rule in 1947.
High-level exchanges are helping
India and Pakistan rebuild trust
On Tuesday, Bashir said Wen told Aziz that he "very much wished to see a peaceful resolution of the Jammu and Kashmir dispute".
He said the most important aspect of the talks between Aziz and Wen were the "clear, unambiguous, categorical assurance by China to defend Pakistan's sovereignty, independence and territorial integrity".
After meeting with Aziz, Wen said his talks with Pakistani prime minister were "productive". "We discussed bilateral, regional and international issues," he said.
For his part, Aziz said: "There is no limit to cooperation between Pakistan and China."
"Both countries have committed themselves to carry forward their strategic partnership in the interest of global and regional peace," a separate statement issued after the talks quoted Aziz as saying.
Aziz said China will help Pakistan build its third nuclear power plant and a groundbreaking ceremony for it will be held on 8 April.
China supplies much of Pakistani
defence hardware requirements
China helped Pakistan set up its second nuclear power plant in the 1990s.
He said Pakistan and China's cooperation in the field of defence is in the interest of peace and stability in the region.
"We deeply appreciate the contribution that China continues to make to assist Pakistan in meeting its legitimate security requirements."
Wen also is to deliver a keynote address on Wednesday at a meeting of the Asia Cooperation Dialogue, a 26-member forum promoting economic cooperation in the region.