Was it hotter than a billy goat in a pepper patch? Hotter than the devil’s underwear? Hotter than two bears fightin’ in a forest fire?

Sure was.

The temperature soared to 103 on Tuesday, setting a record for the date and bringing thermometers up to levels not seen in nearly 23 years. It caused roads to buckle, people to seek medical attention and several outdoor events to be canceled or moved indoors.

The last time the Twin Cities saw the temperature this hot was July 31, 1988, which saw a high of 105, according to the National Weather Service office in Chanhassen. Temperatures last hit triple digits on July 31, 2006, with a high of 101.

The 103-degree reading – which smashed the previous June 7 record of 95 degrees, set in 2004 – was measured at Minneapolis-St. Paul International Airport at 3:26 p.m., the weather service said.

Ramsey and Hennepin counties were under an excessive heat warning through 7 a.m. Wednesday, and the weather service advised people to drink extra water, stay in air conditioning and out of the sun, and check on relatives and neighbors who might be sensitive to the heat.

Local hospitals reported several cases of heat-related illnesses Tuesday, though a strong wind might have helped cool some who were suffering, said Dr. Greg Loppnow, the assistant medical director of the emergency room at the University of Minnesota, Fairview.

“Most people tend to lay low when it’s this hot out, and that’s exactly what they should do,” Loppnow said.

Noting it was 40 degrees cooler in Duluth, Loppnow added: “That’s the best way to stay cool – drive north.”

St. Paul police officers were asked to pay special attention to people in their patrol areas who might be susceptible to problems with the heat, including the elderly and homeless, said officer John Keating, department spokesman.

On metro roads, there were some reports of pavement buckling because of the extreme heat.

Kent Barnard, a spokesman for the Minnesota Department of Transportation, said there were some instances on Tuesday, though fewer than Monday.

“We had 28 major ones (Monday). We probably had a lot more minor ones that didn’t require immediate attention,” he said.

Xcel Energy said Tuesday it might exceed Minnesota’s old record for electricity demand set on July 31, 2006, the last time temperatures topped 100 in the Twin Cities.

Then, Xcel needed 9,000 megawatts of electricity to handle the demand. “We might exceed that” Tuesday, Xcel spokeswoman Patti Nystuen said, noting figures should be available later in the week.

The heat was strong enough to take out the last remnant of winter and one of the heaviest snow seasons on record.

The formerly 60-foot-high snow pile in the Sears parking lot in St. Paul was only a few inches of ice under a layer of dirt at 5 p.m. Tuesday, and it looked like it would be completely gone by Wednesday.

Tuesday’s warm weather came on the heels of Monday’s 97-degree high, another record for the day, during the season’s first heat wave.

But relief is in sight as a cooler and drier air mass moves in from the northwest. Wednesday’s high is forecast to be near 78, and highs in the mid-60s are expected Thursday and Friday, the weather service said.

Dating back to 1891, the official temperature in the Twin Cities has reached 100 degrees 61 times, according to the Minnesota Climatology Working Group. It has reached 103 degrees only 18 times previously.

The hottest temperature on record in Minneapolis-St. Paul was 108 degrees on July 14, 1936, during the Dust Bowl era.

High temperature records also fell Tuesday in St. Cloud, Minn., which hit 101 degrees, and Eau Claire, Wis., which reached 100, as hot and humid air was blown north by strong southerly winds.

The Central and Western Plains were also seeing hazy conditions created as the winds carried up smoke from wildfires burning in the Southeast and Mexico.

Andy Rathbun, Christopher Snowbeck, Mara H. Gottfried, Leslie Brooks Suzukamo, Mary Divine, Richard Chin, Emily Gurnon and Frederick Melo contributed to this report.