Michael R. Bloomberg, the former mayor of New York City, speaks at the Democratic National Convention in July. (Michael Robinson Chavez/The Washington Post)

Former New York City mayor Michael R. Bloomberg is giving $32 million to Harvard University to launch a program to teach mayors and their aides how to tackle major problems facing cities.

The gift, made through Bloomberg Philanthropies and announced Thursday, will harness faculty at Harvard’s business and government schools as well as other urban experts to provide executive training to as many as 300 mayors and 400 aides over the next four years.

Bloomberg, a billionaire business executive, served three terms as mayor of the nation’s largest city.

“With more and more of the world living in cities, mayors are increasingly responsible for solving major challenges we face, from climate change to poverty to public health,” Bloomberg said in a statement. “But despite the importance of the role, mayors often lack opportunities to learn from experts — and one another. By giving mayors tools and resources — and by connecting them with peers facing many of the same challenges — this program will go a long way toward helping them run cities more effectively.”

Bloomberg, 74, earned a bachelor’s degree from Johns Hopkins University and a master’s in business administration from Harvard. His alma maters have benefited substantially from his largesse. In 2013, Johns Hopkins announced a $350 million gift from Bloomberg, pushing his lifetime giving to the private research university in Baltimore past $1 billion.

The Bloomberg Harvard City Leadership Initiative aims to provide mayors with “customized curriculum, instructional and technology tools — most of which will be made freely available to the world,” according to a statement from Harvard. It will also fund internships in mayoral offices, research on innovative city government and a mentoring program pairing successful mayors with newcomers. Much of the curriculum will be delivered online, but there will also be periodic meetings in New York for a number of mayors and key aides.