South Africa’s Constitutional Court ordered the government on Friday to pay social grants on April 1 via its current service provider, seeking to end a fiasco that had threatened the payment of benefits to 17 million people.

The court also said the grant-paying company had to do so under the terms of its existing contract for 12 months before a new deal could be adopted.

The mess stems from the social welfare department failing to take responsibility for social service payments or find a new provider after the Constitutional Court ruled several years ago that the contract was unsound. (Reporting by Tanisha Heiberg; Writing by James Macharia; Editing by Ed Cropley)