The National Weather Service said Wednesday evening that Dorian was pushing northwestward, away from Puerto Rico and the Virgin Islands, and that conditions were expected to improve in those places overnight. But dangerous winds remained possible, forecasters said, and flash flooding would be a threat through Thursday morning.

The Weather Service said the storm was likely to continue northwest for a time and then shift to a more westerly route toward the Bahamas and the United States mainland. But the specifics remained uncertain, and as of Wednesday evening, all of Florida’s east coast, along with part of Georgia, remained within the range of Dorian’s possible paths.

Puerto Ricans had feared that Dorian would be the first real test of Puerto Rico’s revamped electrical grid. Hurricanes Irma and Maria in 2017 left the entire island without power. In some places, it took a year to restore electricity. The island’s electrical grid remains fragile and prone to power losses, though, and some power problems were reported on Wednesday afternoon. The authorities say they have more supplies on hand to make repairs now than they did in 2017.

Unlike Maria, however, Dorian is bringing the island more rain than wind, according to the National Weather Service office in San Juan. “By now, everybody should be home,” Gov. Wanda Vázquez said in a news conference on Wednesday afternoon. “This is not Maria. What we need to do is protect ourselves from the rain.”

Puerto Rico’s secretary of public safety, Elmer Román, urged residents to remain alert to danger after a man died on Wednesday in Bayamón, P.R. The man, who was 80, fell from a ladder as he tried to reach his roof to clear drains ahead of the storm, El Nuevo Día, Puerto Rico’s largest newspaper, reported.