The sun came out but the power stayed off in nearly 170,000 homes and businesses across four states — Ohio, New York, Pennsylvania and Vermont — on Saturday as Debby moved out of the country and into Canada.

After first arriving in Florida as a hurricane, the storm spent the better part of a week unleashing tornadoes and flooding, damaging homes and taking lives as it moved up the East Coast.

Though the skies had cleared, a flood warning remained in effect in a small part of northern New York where up to 7 inches of rain had fallen. The National Weather Service said water there was receding slowly, and many roads remained flooded.

Some of the worst flash flooding happened Friday in villages and hamlets along the New York-Pennsylvania border.

In Steuben County, which borders Pennsylvania, officials ordered the evacuation of Jasper, Woodhull and part of Addison, and said people were trapped as floodwaters made roads impassable.

In Woodhull, a creek overtopped a bridge. Area resident Stephanie Waters said parts of sheds, branches and trees were among the debris that slammed into the span.

Fire Chief Timothy Martin said everybody in the town was safe, but “every business in Woodhull is damaged.”

Debby was downgraded to a tropical depression Thursday and was a post-tropical cyclone Friday, the National Hurricane Center said. It made landfall Monday on Florida’s Gulf Coast as a Category 1 hurricane, crossed to the Atlantic Ocean and hit land a second time early Thursday in South Carolina as a tropical storm.

There have been at least nine deaths related to Debby, most in vehicle accidents or from fallen trees.