Food prices in Germany rose sharply in December, posting their strongest gains in four years. The rise added to higher costs for energy, keeping inflation in Europe's largest economy at a high level.

German inflation edged up at the end of 2012, rising to 2.1 percent in December compared with 1.9 percent in November, according to latest data released by the German Statistics Office, Destatis, Tuesday.

The consumer price index was boosted markedly by soaring food prices, which jumped 4.8 percent compared with the same month a year ago.

"This marks the strongest increase in food prices since September 2008," Destatis said in a statement.

Year-on-year, food prices rose 3.2 percent, adding to 5.2 percent higher prices for energy - the primary drivers of inflation in Germany last year.

Food prices were expected to remain high, the BVE food industry lobby group said, predicting 3.2 percent higher prices for 2013.

"More people with higher incomes are living on this planet, driving up prices for meat and dairy products," BVE Chief Executive Sabine Eichner told Reuters news agency Tuesday.

Moreover, droughts, fires and floods had affected harvests all over the world in 2012, she added, which had led to rising food prices.

The German Statistics Office noted that more expensive foodstuffs had kept annual inflation in 2012 at a comparatively high level of 2.0 percent. Although inflation dropped slightly from 2.3 percent in 2011, the rate was still up markedly from 1.1 percent inflation in 2010 and 0.4 percent in 2009.