The world's largest chemical producer BASF reported a better-than-expected second-quarter net profit as it managed to increase volumes and prices thanks to strong demand.

Low commodity prices during the coronavirus pandemic weighed on BASF's earnings last year, but the German group recorded a rapid recovery so far in 2021 as the global economy picked up faster than expected.

"We achieved volumes growth and price increases across all regions and all segments compared with the second quarter of 2020," BASF's Chief Executive Martin Brudermueller said in a statement.

The Germany-based giant reported a second-quarter net income of 1.7 billion euros ($2.01 billion) compared to the 1.4 billion euros expected on average by analysts in a company-provided poll.

The diversified group said price and volumes increased especially in its surface technologies, chemicals, materials and industrial solutions segments.

The company confirmed the preliminary figures for second-quarter adjusted earnings before interest and tax (EBIT) and sales as well as the 2021 guidance it announced on July 9.

($1 = 0.8463 euros)

(Reporting by Zuzanna Szymanska in Gdansk; Editing by Jacqueline Wong) ((zuzanna.szymanska@thomsonreuters.com; + 48 58 769 65 61;))