The European Commission and AstraZeneca said on Friday they had reached a settlement on delivering remaining COVID-19 vaccine doses by the British drugmaker and also ended pending litigation in Brussels.

The settlement clears a major overhang for AstraZeneca, whose cheap and easily transportable vaccine has faced several setbacks, including the lawsuit and worries about possible side-effects. It also allows the European Union to speed up inoculations amid shortages.

Under the settlement , AstraZeneca has committed to deliver 60 million doses of its vaccine, Vaxzevria, by the end of the third quarter this year, 75 million by the end of the fourth quarter and 65 million by the end of the first quarter of 2022.

The European Commission launched legal action against AstraZeneca in April for not respecting its contract for the supply of COVID-19 vaccines and for not having a “reliable” plan to ensure timely deliveries.

The EU’s executive body said that under the new agreement, member states will be provided with regular delivery schedules and if there are any delayed doses, capped rebates would be applied.

“There are significant differences in vaccination rates between our member states, and the continued availability of vaccines, including AstraZeneca’s, remain crucial,” said EU Commissioner for Health and Food Safety Stella Kyriakides.