A dangerous mix of sleet and freezing rain fell over most of Maine on Tuesday, leading to treacherous road conditions, widespread power outages, several traffic accidents and scores of storm cancellations.

Sleet and freezing rain fell throughout the day and howling northeast winds gusted up to 54 mph at Cape Neddick in York and 45 mph off the coast of Cape Elizabeth, according to the National Weather Service office in Gray.

The buildup of freezing rain and ice on tree limbs started to take its toll late Tuesday afternoon as limbs fell on power lines, leaving several thousand Central Maine Power Co. customers in the dark.

CMP reported more than 5,500 customers in four counties without power as of 5 p.m. About 4,400 of those customers were in Cumberland County, with Yarmouth being the hardest hit, with 1,267 customers affected.

The outages decreased as crews restored power. By midnight, CMP reported that just 380 customers were without power.

Eric Schwibs, a meteorologist with the National Weather Service, said he would prefer forecasting a snowstorm instead of Tuesday’s messy mix, a storm he described as a “weather potpourri.”

“Most of the state saw a messy, mixed bag,” he said. “It was unfortunate that it was a mix, but this type of storm is typical for this time of year. I would give anything to get a straight snow event.”

Schwibs said Tuesday’s storm brought far more sleet and freezing rain than snow. The Franklin County town of Eustis got the most snow, 4.1 inches. Saco got 1 inch of snow and sleet, Lewiston got 2 inches of sleet, Whitefield in Lincoln County reported 1.5 inches of sleet, and Gray recorded 1.1 inches of sleet.

Schwibs said that of the two types of precipitation, sleet is preferred because freezing rain sticks to surfaces while sleet hits the ground in pellet form.

Sleet is caused when a warm layer of air melts falling snow into rain, and that rain then falls into colder air below and freezes again before hitting the ground.

Strong winds were produced by the storm, mostly along the coast. The National Weather Service said wave heights of 20 feet were recorded at a buoy off Two Lights State Park in Cape Elizabeth, and waves reached 27 feet at the Isle of Shoals, 6 miles off the coast on the Maine-New Hampshire border.

In Kennebunk, Beach Avenue near Kennebunk Beach had to be closed because large waves were crashing over the seawall and into the road.

York police posted a video on the department’s Facebook page of monster waves crashing against the rocks at Nubble Light.

The uneven weather pattern affected state and local governments, businesses and schools.

Portland City Hall, municipal buildings and all library branches were closed Tuesday. In Wells, the town hall and all other nonessential offices were closed for the day.

Schools across the state were closed, and the Legislature canceled all hearings and meetings scheduled for Tuesday. Legislative offices also were closed. Cumberland County courthouses closed for the day.

The Cumberland County sheriff’s administrative offices in Portland were closed Tuesday. In a post on Facebook, the sheriff’s office warned drivers of “treacherous road conditions” and asked people to stay at home if possible.

The speed limit was reduced to 45 mph for the entire length of the Maine Turnpike for most of the day and evening.

Though roads remained passable, some became clogged with slush and ice.

Windham police closed Route 202 between Swett Road and Webb Road after a head-on collision between two vehicles around 5 p.m. Police said slick roads contributed to the crash. No injuries were reported.

A car rolled over Tuesday afternoon on Route 201 in Winslow, forcing traffic delays in both directions. Winslow police said the driver was going too fast before his tires got caught in deep slush, forcing his car to go into a snowbank. The driver and passenger were not injured, even though their car rolled onto its roof.

Schwibs said temperatures in Portland should hover around 32 degrees into the early morning Wednesday and precipitation will end by sunrise, with temperatures slowly rising throughout the morning.

By Wednesday afternoon, the weather will have transformed.

“The sun will break out Wednesday afternoon with highs in the low 40s,” Schwibs predicted.

Morning Sentinel Staff Writer Colin Ellis contributed to this report.