Oct 27 (Reuters) - Spanish dried-food producer Ebro Foods posted a 5.8% rise in net profit in the first nine months of the year on Wednesday after raising prices to offset higher costs.

European commodities have been affected by higher energy, oil and shipping costs, which have also driven up consumer prices in Spain and pushed inflation to a 13-year-high in September.

"Prices have been rising throughout the year, but have spiked dramatically since June 2021," the company said in a statement, adding it expected costs to rise 83 million euros this year, following a 60 million euro increase in 2020.

Net profit for January to September stood at 155.2 million euros, up from 146.7 million euros a year ago, while sales edged down 3.5% to 2.08 billion euros.

The Spanish food group expects price increases will allow it to remain profitable into the end of the year and it forecasts 2021 sales of between 2.79 and 2.83 billion euros.

Adjusted earnings before interest, taxes, depreciation and amortization should come to between 347 million and 352 million euros, the company said.

($1 = 0.8620 euros) (Reporting by Aida Pelaez-Fernandez Editing by Nathan Allen and Mark Potter)