Japan was bracing Tuesday for a severe butter shortage that threatened to crimp cake-making nationwide, bringing echoes of last year's dairy dire straits that left supermarket shelves empty.

The Japan Dairy Association is warning that demand for pats will outstrip supply by more than 7,000 tonnes, prompting the government to ready emergency imports.

Butter shortages last year provoked anguish for shoppers, especially in the run-up to the Christmas cake-baking season, with rationing introduced immediately by any store that had a delivery.

"The government plans to have butter imports on a scale sufficient for stable supply," said farm minister Yoshimasa Hayashi on Tuesday, adding details of the emergency measure will be announced this week.

At the root of the problem is a wider dairy deficit that sees farmers prioritising the raw material for sales of liquid milk.

Herds have been cut over recent decades as demand has slimmed with the ageing of the Japanese population.

Last year's butter imports -- 7,000 tons in May and a further 3,000 tons in September -- were the first time in years that Tokyo had raided foreign dairy markets.