Mayor Bill de Blasio on Thursday announced that he would spend $150 million to upgrade five large New York parks — $30 million to one in each borough — in what he called an effort to combat an unequal system in which parks in wealthier parts of the city were well financed while those in poorer neighborhoods were neglected.

“This is about fairness,” the mayor said at a news conference at St. Mary’s Park in the South Bronx, which will receive the new financing. “We talk about fighting inequality. This is one of the most basic ways to do it.”

Adding that parks in poor neighborhoods have long decayed and struggled to get resources, the mayor said, “The people who needed it the most got the least.”

Besides St. Mary’s Park, the other parks include Highbridge Park in Upper Manhattan; Betsy Head Park in Brownsville, Brooklyn; Astoria Park in Queens; and Freshkills Park on Staten Island. The money will be spent on improvements like new baseball and soccer fields, running tracks and hiking trails.