A city has been celebrating after a kind-hearted donor handed-over $34m (£21.8m) to local authorities to help underprivileged schools and non-profit organisations – anonymously.

The mystery giver told The San Francisco Foundation (TSFF) – which focuses on expanding opportunity and ensuring an equitable future for Bay Area residents – that the City of Oakland in California was to use the transformative money ‘in the streets’ with a big focus on education, healthcare and housing.

Divided-up across 17 organisations, TSFF said the money would be used to close the achievement gap, towards affordable housing, creating cradle-to-career pathways of opportunity, growing middle-wage jobs, and removing barriers to health access for parents and children from across the city.

At a press conference, announcing the sizeable donation was TSFF’S CEO, Fred Blackwell, who said the call he received was a once-in-a-lifetime opportunity, adding: “We have never gotten a phone call like that in the past.”

Mr Blackwell, who acknowledged opportunity was not equal among certain racial and ethnic groups, said he would work closely with the donor to make sure everyone – regardless of race, class, or where they live in Oakland – had a fair shot at a good life and opportunities to live to their full potential.

Eager for African-American students to thrive under the donation, one recipient organisation, #YesWeCode – an initiative which targets low-opportunity youth and provides them with training to become world-class computer programmers – believes that, with as little as nine to 12 months of training in computer coding, needy young adults are able to successfully compete for entry-level jobs earning between $55,000 to $75,000 (£35,300 to £48,150).

The largest sum of $6 million (£3.8) will go towards the Oakland Public Education Fund to be invested in 12 branches of the organisation’s support, including early childhood education, restorative justice, African-American student achievement, and community school co-ordinators.

City council member, Larry Reid, said those who can’t find what the care they need at home will get it through the donation at TSFF.