A BMW automobile logo is pictured January 9, 2020 in Brussels; The European Commission has accused BMW, Volkswagen and Daimler of avoiding competition with each other on technologies that reduce harmful emissions

German carmaker BMW reported a 29-percent drop in profits in 2019 on Thursday, blaming heavy legal costs and high investments in a challenging economic environment.

Despite record revenues of 104 billion euros ($115.4 billion), driven by strong sales of its highest-end models, amounted to just 5.0 billion euros, the company said in a statement.

The comes despite a two percent increase in the number of cars sold.

The figures took a big hit in first quarter from a 1.4-billion-euro provision set aside in connection with EU antitrust proceedings.

The European Commission has accused BMW, Volkswagen and Daimler of avoiding competition with each other on technologies that reduce harmful emissions.

Investment in research and development, especially on electric models, also contributed to the drop in profits, as did the higher manufacturing costs from a growing proportion of electric vehicles.

For BMW, 8.6 percent of cars sold in the European Union in 2019 were electric or hybrid.

The group aims to roughly double that figure by 2021. It also plans to offer 25 electrified models by the end of 2023, half of which will be fully electric.

Under new EU regulations, carmakers must limit their fleets to an average of 95 grams of CO2 per kilometre by 2021 or face hefty fines—a target that will be impossible to achieve without clean-energy electric vehicles.