A severe storm with heavy winds swept through the Cape around noon on Tuesday, and while it lasted less than an hour, it left several communities without power and facing a lengthy cleanup that likely will take several days in the heart of summer.

The National Weather Service confirmed two tornadoes, rare in the region, touching down in South Yarmouth and Harwich as the storm passed through. Damage was heavy in those two towns as well as in Chatham and Dennis.

The maximum wind speed the tornado reached was 110 mph, according to a statement by the National Weather Service.

Only three tornadoes had been recorded previously in the Cape’s history, according to the NWS, including a harmless water spout in Woods Hole last year that fizzled when it reached land.

As off 6:30 A.M. on Wednesday morning, roughly 31,000 Eversource customers were without electricity. Dennis, Harwich and Chatham had the most amount of people without power.

Following Tuesday’s storm, first responders were still finding downed wires and trees blocking roads at 8:30 p.m. The Barnstable County Fair closed for the day, but was expected to be open today.

During a conference call with state and regional agencies Tuesday afternoon, Harwich Fire Chief Norm Clarke said main roads in his community had to be cleared so emergency vehicles could get to the hospital.

“We have devastation I have not seen in 40 years,” he said.

The powerful storm ripped the roof off a West Yarmouth motel.

Bruce and Diane Martin had checked into the Cape Sands Inn as the rain began to pound down early Tuesday afternoon.

The couple made it up to their room on the second level of the inn. Five minutes later, as they peered out the bay window, they saw a flagpole bend sideways. Then a tornado lifted the roof opposite their room right off and carried it “in slow motion” into the backyard.

Stephanie Lessard, of Quebec, also was staying at the Cape Sands Inn with her family when the tornado hit. She saw something spinning in the sky, and suddenly the roof of her room lifted and fell back down. Not knowing what to do, she and her family ran into the bathroom.

As the sounds got worse, they ran down the stairs to the first floor.

“I’m still in shock,” Lessard said. “I didn’t think I’d live in a tornado. It feels like a movie.”

Yarmouth police Lt. Andrew O’Malley said no one was injured despite the heavy damage.

“The building commissioner was here and he took a view of the damage to the building,” O’Malley said. “We just want to make sure that everything is secure here and people are safe.”

The lower and mid-Cape took the brunt of the storm.

Chris Parker was on the phone next to the bay window of his first-floor apartment at 50 Yarmouth Road in Hyannis when the storm uprooted a 100-foot maple and sent it crashing against the front of the house.

“I heard a crack, boom — it moved me right out of my chair,” Parker said.

Live wires fell inches from the window and a large branch fell across the driveway of the two-story house.

A woman on the second floor who did not want to give her name said she had just closed the windows and was mopping up rain water when she saw the tree headed in her direction.

“I ran and I screamed,” she said shortly after the storm blew through. “I’m still shaking.”

Clarke, the Harwich fire chief, called on Eversource to help clear wires so public works employees could remove tree limbs blocking the roads. Harwich police pleaded with the public via their Facebook page: “Please stay HOME!”

According to Eversource, about 10,500, or 93 percent, of the customers in Harwich were without power late Tuesday afternoon. In neighboring Chatham, 9,000 households, more than 98 percent, were without power.

About 50,000 residents Capewide were without power following the storm.

Doug Foley, vice president of electric field operations for Eversource, predicted it would take 24 to 36 hours just to assess the damage to the system. It was hard to say when power would be fully restored, despite hundreds of utility crews pouring onto the Cape from Connecticut, New Hampshire and Western Massachusetts.

Eversource also had sent up a helicopter for a better view of the damage.

“Customers should plan for a multi-day event,” Foley said.

The storm swept in across the Upper Cape shortly after 11:30 a.m.

The neighborhoods of New Seabury and Popponesset that run along Mashpee’s southern coastline saw a lot of damage to telephone poles, trees and primary wires, according to Mashpee fire Capt. Joseph Fellows. ”(The storm) kind of went through like a buzz saw to the southern coast of Mashpee,” Fellows said.

There also were some trees that toppled on homes, but there wasn’t any critical damage, Fellows said.

Around noon, Bourne firefighters were kept busy with reports of flooded homes, particularly in coastal areas such as Scraggy Neck in Cataumet.

Nearby in Falmouth, the storm caused flooding in low-lying areas and lopped off stray tree limbs, but damage was minor, fire department Deputy Chief Timothy Smith said.

But the storm created more havoc as it churned down Cape.

Yarmouth Public Works Director Jeff Colby said the town opened its emergency operations center so the flood of calls could be routed through the centralized dispatching system to the right resources, an usual necessity for summer weather. “Based on the storm, we thought it was helpful to centralize,” Colby said.

By mid-afternoon Tuesday, four loaders supported by chainsaw crews were clearing trees to make roads passable. The crews were conferring with Eversource to make sure the areas had no live wires.

“We’re still trying to get a handle on the damage,” Colby said.

Bill Snowden went to check on his sister Laurel once the storm quieted down and was stunned by what he saw near her home on Antlers Avenue in South Yarmouth.

“There is a 100-foot swath where 50-foot pine trees were uprooted,” Snowden said. Some were snapped off about 10 feet up and flattened; it looked like Oklahoma. How it didn’t hit anybody is a miracle.”

Residents along Long Pond Drive and North Main Street in South Yarmouth were helping to direct traffic around downed wires, which dangled across the roads as vehicles attempted to navigate the debris. A massive tree tangled in wires was blocking passage through Long Pond Drive near the Station Avenue side at around 12:45 p.m.

Other roads throughout Yarmouth were flooded and strewn with debris.

Not far away on Lower County Road in Dennis Port, Russell Olsen described the damage in his area as “massive destruction.”

“It hit at 12:15,” Olsen said. “We were watching it on the news, and you could see it approaching Lower County.”

Meanwhile, emergency workers on the Lower Cape were kept busy as the storm continued in their direction.

In Harwich, Joy George was just wrapping up a session with a client at her yoga studio on Chatham Road. “All of a sudden, the rain was going sideways; then it was going the other sideways,” she said. “Then in the parking area I could see the circular movement of air. You could hear the sound of it: ‘Whooo.’”

George’s sister, from New York, was visiting their mother, who lives next door to the studio. “Her van was parked there, and it has a big, old tree on it,” George said.

Chatham police Chief Mark Pawlina was at Larry’s PX to get lunch when he got the tornado alert on his phone.

He told everyone to back away from the windows and get ready to get under the tables.

“We’ve got trees and power lines down at various locations,” he said.

During the conference call with emergency agencies, a representative from Cape Cod Hospital asked Eversource to contact the hospital if they anticipated shutting down the power so that surgical services would switch to generators as needed.

One shelter was opened early Tuesday evening, at Dennis-Yarmouth Regional High School on Station Avenue, where nurses would be available and pets were being accepted.

Although the fast-moving storm caused considerable damage, most people were taking it in stride in the hours that followed.

Lessard, who had been staying at the Cape Sands Inn when the roof ripped off, later joked that she was tempted to buy a lottery ticket. “We’re lucky,” she said.

— Ethan Genter, Beth Treffeisen, Jessica Hill, Tanner Stening, Cynthia McCormick, Edward Sutelan and Jason Savio contributed to this report.