Under the agreement with employee representatives, BASF also said it would invest between €9 billion to €10 billion over the same time period on measures to safeguard the future of the site, in south-western Germany.
"The recent economic crisis highlighted the importance of close and trusting cooperation between the works council and management," BASF board member Harald Schwager said in a statement.
"This was possible because both sides were willing to show flexibility on human resources issues. The new site agreement captures this spirit and ensures that the site is equipped to weather future storms."
In common with other chemicals companies, BASF has invested heavily in Asia in recent years rather than in Europe. Last week it said it was transferring another 300 jobs to India.
BASF, with 105,000 workers worldwide and sales of €50 billion, has also been on an acquisition spree of late, buying Switzerland's Ciba in 2009 for €3.8 billion and Germany's Cognis this year for €3.1 billion.