TOKYO — Japan's economy shrank in the last three months of 2012, its third straight quarter of contraction, giving the government ammunition to defend its "weak yen" strategy as necessary to getting growth back on track.

The 0.4 percent contraction in annualized terms in October-December was worse than expected. Many analysts had forecast the economy would emerge from recession in the final quarter of 2012 as the Japanese yen weakened against other major currencies, giving a boost to Japanese export manufacturers.

Government spokesman Yoshihide Suga acknowledged the lingering weakness in the economy, while voicing optimism over a global recovery.

"We also expect our nation's economy to make a gradual recovery," he said Thursday.