BANGOR, Maine — The combination of prolonged heavy rain and rising waterways produced flash flooding in Maine’s largest cities and made travel difficult, if not impossible, across much of the state on Wednesday.

The storm dumped more than 9 inches of rain on parts of coastal Maine by late afternoon, according to the National Weather Service. It also knocked out power to thousands of utility customers. Emera Maine, which reported more than 13,000 outages in its service area, issued a warning to avoid touching electrical equipment in flooded basements. By 9:15 p.m., Emera reported 7,426 remaining outages. Central Maine Power reported more than 8,000 outages as of 5 p.m.

Flood watches remain in effect in many areas of the state through Thursday morning, according to the weather service.

By late morning Wednesday, Portland was experiencing street flooding in low-lying areas, swamping vehicles and leaving drivers stranded. Water flowed into basements as well as the parking lots of several businesses. Cars were nearly submerged on Franklin and Somerset streets, according to reports by WGME-TV just after noon. There also was flooding on outer Congress Street, the station reported.

The University of Southern Maine canceled all classes after 12:30 p.m.

Flood waters flowed into parking lots in downtown Bangor near the Kenduskeag Stream and pooled in low areas of underpasses in the city by early afternoon. Bangor police reported the areas of Broadway Park, State Street by Cascade Park, Stillwater Avenue by Howard Street and the downtown Interstate 395 ramps were all affected, with the I-395 Farm Road ramps closed for a time.

Searsport led the state with 9.7 inches of rain in a 23-hour period, as of 3:49 p.m., according to unofficial totals recorded by the weather service. Bangor received 5.3 inches overall since it started raining Tuesday night and a daily record 5.1 inches of rain between midnight and mid-afternoon Wednesday. Lewiston got 6.6 inches and Portland received 5.8 inches over the preceding 23-hour period.

Coastal areas were soaked as well. Sections of Route 1 became impassable in Belfast and Searsport by mid-afternoon.

Bucksport was particularly hard hit by the surge of water. Route 1 near McDonald’s was completely impassable by mid-afternoon. Route 46 in the Bucksport area also was flooded in several spots and impassable near the golf course. For a while Wednesday afternoon, there was no through access between Bucksport and Ellsworth, according to the Bucksport Fire Department.

A small mudslide blocked part of Route 1A in Dedham for awhile.

High winds on the coast created 4- to 6-foot swells in Bar Harbor that forced suspension for about two hours of tenders carrying passengers to and from town and the Seabourn Quest cruise ship, according to Harbormaster Charles Phippen.

Phippen estimated the winds at 30 to 45 knots between about 1 and 3 p.m. when the cruise ship, which has a capacity for 450 passengers and 330 crew members, ceased tender operations. Because of the anticipated weather, the Regal Princess, with a capacity for about 3,500 passengers and 1,300 crew, had canceled its scheduled Thursday visit the day before, according to Phippen.

He said one fisherman who was moored only 250 to 300 yards from the town pier was uncomfortable trying to tackle the choppy waves in the harbor with his 14-foot skiff, so Phippen went out to get him and his crewmate in a 20-foot inboard-outboard boat.

“We’ve had a slight improvement in the weather,” he said about 3:30 p.m. when the tenders had resumed operation. He expected the Seabourn Quest would be able to depart as scheduled at about 5 p.m.