KUALA LUMPUR (Reuters) - Chinese President Xi Jinping said on Friday he and Malaysian Prime Minister Najib Razak had agreed to elevate ties to a "comprehensive strategic partnership", aiming to boost military cooperation and nearly triple two-way trade to $160 billion by 2017.

The Chinese and Malaysian leaders spoke soon after U.S. President Barack Obama canceled a week-long tour of four Asian nations due to the U.S. government shutdown.

Najib said he agreed with Xi, who is visiting Malaysia ahead the Asia-Pacific Economic Cooperation summit in Indonesia, to encourage more joint military exercises and visits between the nations.

China is already Malaysia's largest trading partner, with two-way trade last year totaling 181 billion ringgit ($57 billion).

(Reporting By Yantoultra Ngui; Editing by Stuart Grudgings; Editing by Paul Tait)