Last month was Boston's hottest July on record, and the city's hottest month since meteorological data was first recorded in 1872. Twelve days of the month hit or surpassed 90 degrees.

Hot summer months are not unusual for Boston, but record-breaking heat tests the limits of city resources and threatens the health of vulnerable residents. Studies based on climate change predictions suggest what feels unusual now could be an omen of what’s to come.

Historically, Boston has an average of 11 days a year with 90-degree plus temperatures. That number will jump to 41 days by the year 2050 if climate change continues on its current path, according to climate scientist Rachel Licker. Licker is the co-author of a recent study by the Union of Concerned Scientists, which predicts heat that will be “significantly worse than what the recent weather felt like,” she said.

And it gets worse. If there’s no action on climate change by 2100, Boston would likely experience a heat index above 100 degrees for 69 days a year, the study found. Licker said the study does not account for the urban heat island effect, so the numbers in their report may be conservative. Urban land use and design could either help or hinder efforts to cool the city down.

This July was particularly notable for its high overnight temperatures, according to Alan Dunham, meteorologist at the National Weather Service.

“The fact that the minimum temperatures are at a record setting high, that’s what contributing to overall temperature being at record-setting levels,” said Dunham. “It’s not cooling down at night.”

Hot overnight temperatures can exacerbate the health risks of extreme heat during the day, according to Paul Chen, director of clinical operations at the Emergency Department of Brigham and Women’s Hospital in Boston. Cool nights are essential for the body to recover from the physical stress of a hot day.

“When your body’s having to manage these high temperatures for an entire 24-hour cycle, eventually your body will not be able to compensate,” said Chen. “That’s when you can get into trouble.”

Consequences can range from dehydration and muscle cramps to heat stroke, which can be fatal. Heat is one of the top weather-related causes of death in the U.S., according to the Center for Disease Control. Children, elderly people and those without access to air conditioners are particularly vulnerable.

Warm nights are partly a result of the urban heat island effect, which is when concrete and asphalt in cities absorb heat during the day and radiate it back out at night. This keeps cities like Boston warmer than less densely populated surrounding areas.

July also put pressure on the region's infrastructure, particularly the grid, due to a spike in energy demand to power air conditioners on particularly hot days, according to the New England Power Generations Association, which represents 90 percent of energy generation in New England.

“This month has been a real-life stress test, and the system has worked very well,” said association President Dan Dolan. He added that there were no major power outages last month, which he sees as a victory.

A new natural gas power station in Bridgeport, Connecticut has helped the system compensate for the loss of supply due to the recently shuttered Pilgrim nuclear power plant in Plymouth, Massachusetts, according to Dolan. He said that an uptick in rooftop solar panels has also helped the grid keep sufficient supply.

Dolan said his members are prepared for more extreme heat in August, which is historically the hottest month of the year with some of the highest energy demands.

But Licker said there's still hope. The numbers in the Union of Concerned Scientists' report are not set in stone, and there’s still time to reduce carbon emissions and prevent hotter summers.

“Decisions we make now could really help craft a future that’s safer for ourselves, our kids and our grandkids,” she said. “There’s a lot of power in the decisions we make now. I think there’s a lot of hope to be derived from that.”