South Africa’s national school pass rate rose for the first time in three years as the government boosted spending on education and teachers got to grips with a new curriculum.

South Africa spent R213.7bn on basic education in the 12 months ended March last year, or about 15{d59e984f9fbc5c09e4ab0305e27bfa5819922b7230cd324f89a660f78358ca33} of the total budget, and the allocation is projected to rise an average of 7.4{d59e984f9fbc5c09e4ab0305e27bfa5819922b7230cd324f89a660f78358ca33} annually over the next three fiscal years, according to the National Treasury.

The country allocates a higher proportion of its budget toward education than the US, UK and Germany, United Nations data shows.

The proportion of successful final-year students at state schools increased to 72.5{d59e984f9fbc5c09e4ab0305e27bfa5819922b7230cd324f89a660f78358ca33} last year from 70.7{d59e984f9fbc5c09e4ab0305e27bfa5819922b7230cd324f89a660f78358ca33} in 2015, Basic Education Minister Angie Motshekga said on Wednesday. More than 828 000 pupils wrote the examinations, the most yet.

“The performance of South African learners is improving,” Motshekga said in a speech in Midrand, north of Johannesburg. “We have to further improve the outputs of the schooling system.”

After climbing for four straight years, the pass rate deteriorated in 2014 and 2015 after a curriculum overhaul. Despite the improvement last year, the government still has some way to go to turn around an education system that was tailored to the needs of the white minority under apartheid rule, which ended in 1994.

South Africa’s primary-education system was rated 126th out of 138 countries in the World Economic Forum’s 2016-17 Global Competitiveness Report, while its higher-education and training system ranked 134th.