More than 200 flights were canceled in Portugal on Wednesday as Storm Charles lashed the country with torrential rain and powerful winds.

Before the storm, Portugal’s government had declared a nationwide state of alert, ordering schools and nonessential public services to close on Wednesday. The authorities also urged people to remain indoors where possible as the storm approached.

Storm Charles was named by Portugal’s weather service, IPMA, which issued its highest level weather warnings for rain and wind across large parts of mainland Portugal and the Madeira archipelago, with wind gusts forecast to reach about 90 miles per hour.

Forecasters had also warned of the possibility of a sting jet, a feature of some powerful storms in which a narrow band of rapidly descending air can produce exceptionally strong winds. Such winds can cause widespread damage, as Storm Kirstin did earlier this year when it hit central Portugal.

On Wednesday, however, Charles appeared to lose strength. As the storm passed north of Madeira, where nearly 12 inches of rainfall was recorded, IPMA reported that the center of the storm had split into two over the Atlantic Ocean, weakening before it reached mainland Portugal.

The change prompted the service to reduce the seriousness of some weather warnings as Charles moved through the southern coastal Algarve region and toward Lisbon, the capital.