A truck makes its way through a flooded Wellwood Avenue in Lindenhurst...

A truck makes its way through a flooded Wellwood Avenue in Lindenhurst during Tropical Storm Elsa on July 9.   Credit: Newsday/J. Conrad Williams Jr.

It was not your imagination: July’s torrents of rain were indeed historic.

New York and Massachusetts last month had the most rain of all U.S. states — each having their wettest July on record.

While Tropical Storm Elsa certainly contributed, downpours throughout July made up most of the total in some areas, including Islip, officials said Thursday.

That was not the sole record set last month. It also was the globe’s warmest July in the last 142 years, when both the temperatures of the land and ocean are measured, the National Oceanic and Atmospheric Administration said.

That gauge topped the 20th-century average of 60.4 degrees Fahrenheit by 1.67 degrees,

It also surpassed by 0.02 degree the 2016 record that had been tied in 2019 and 2020, NOAA reported.

And last month also set a record for the hottest land temperature, by 2.52 degrees. For the ocean, it was the sixth-warmest July since records first were kept.

July's rainfall, 7.81 inches, fell throughout New York, Karin Gleason, a climatologist for the National Oceanic and Atmospheric Administration, said by email. The previous high was 7.12 inches in 1897, NOAA data shows.

Matthew Wunsch, a National Weather Service meteorologist, estimated Elsa, which finally quit Long Island on July 9, unleashed around 2½ inches of rain in Islip, though New York City received around 4 inches.

And Elsa did cause lots of streets to flood, including 17 county roads in Nassau; Suffolk had fewer problems but some parts of New York City’s subways were inundated, along with several crucial roads, including the Major Deegan in the Bronx.

While Gleason was not immediately available to provide the matching rainfall figure for Massachusetts, 10.30 inches were recorded there in July, according to the Northeast Regional Climate Center, a Cornell University program that analyzes National Weather Service data for a dozen northeastern states.

NOAA’s latest outlook for the September to November period also predicted that for almost the entire eastern half of the country, including New York, there are equal chances of above-normal, normal or below-average precipitation.

Much of the East Coast, from North Carolina to Maine, can anticipate above-normal temperatures.

For the New York region, Edmund Kar-Man Chang, a professor at the School of Marine and Atmospheric Sciences at Stony Brook University, said by email that "the above average temperature mainly reflects the global warming temperature trend, and there is no strong forcing on the precipitation over our region."

That punishing drought in the West — and the wildfires it fuels by turning so many trees and plants into what is essentially just tinder — likely will rage on. Dan McEvoy, regional climatologist at the Western Regional Climate Center, said the number of blazes and acreage burned so far this year is about equal to the 2020 totals.

"What we are seeing this year is really a remarkable growth and spread of these fires on an individual basis," he told reporters on a conference call.

This is the second year in a row that smoke from Western wildfires has polluted air in the Northwest for days and weeks at a time — and for shorter periods, done the same in other parts of the nation, including the tri-state area.

"All signs," McEvoy said, "really point to this becoming a more likely scenario in future summers."