Machinery orders rose for the first time in four months in December, a sign that companies will increase spending to meet demand from abroad, government data showed Thursday.

Factory orders rose 1.7 percent from November, when they dropped 3 percent, the Cabinet Office said. Orders, an indicator of capital spending in three to six months, were projected to climb 5 percent, according to the median forecast of 28 economists surveyed by Bloomberg News.

Demand from China and the U.S., Japan's biggest export markets, is improving corporate earnings and prompting companies including Mitsubishi Electric Corp. and Hino Motors Ltd. to invest in plants and equipment. Companies surveyed by the government forecast orders will increase 2.7 percent this quarter after contracting at the end of 2010, the report showed.