German luxury automaker BMW AG said earnings fell 28 percent in the second quarter due to higher costs for staff and investments in new technology.

The fall in profit was partly due to one-time gains recorded in the same quarter last year, and the company made a strong showing with other earning figures in the most recent quarter.

The Munich-based carmaker cited “intense market competition” and warned that any worsening of Europe’s economic crisis or a growth slowdown in China could hurt its business. It is already facing headwinds from Europe’s debt crisis, which has devastated economies in nations such as Spain and Greece and kept Europe sales flat from the year before.

Company shares traded down 4 percent at 58.27 in midday trading European time.

Net profit fell to 1.28 billion ($1.57 billion) from 1.77 billion a year ago. Sales rose 7 percent to 19.2 billion.

BMW said “higher personnel costs, increased expenditure on development and new technologies, intense market competition and the higher baseline of the previous year’s record second-quarter earnings, all contributed to the lower earnings figures in 2012.”

Analyst Max Warburton at Sanford C. Bernstein in London wrote that “BMW’s numbers are still good but they are not great, unlike second quarter 2011

Staff costs were boosted by a 5 percent increase in the workforce to 102,000. The company said it was still recruiting engineers and high-skill workers.

BMW’s earnings fell short of the consensus estimate for 1.38 billion compiled by FactSet. It held on to its earnings prediction for the year by exceeding last year’s sales volume and pre-tax earnings, but said those forecasts are “based on the assumption that worldwide economic conditions will not deteriorate sharply.