Super Typhoon Songda ripped across the western Pacific on Thursday, dropping heavy rain on the Philippines and threatening Okinawa and the Japanese main islands with rain and damaging winds into the weekend.

Songda was a Category 5 storm late Thursday, with maximum sustained winds of 161 mph and gusts of 195 mph, according to the Joint Typhoon Warning Center in Pearl Harbor, Hawaii. The storm was producing wave heights of 38 feet in the Pacific, forecasters said.

The forecast track for Songda put it over Okinawa on Saturday night as a Category 2 storm, with maximum sustained winds of 109 mph and gusts up 132 mph.

Okinawa is home to several U.S. military installations, including Kadena Air Base, home to nearly 18,000 Americans, and Camp Courtney, home of the III Marine Expeditionary Force and its 16,000 Marines, according to U.S. Forces Japan.

The Japan Meteorological Agency said Songda would lose strength but still be a strong storm as it approaches the country's main islands Sunday.

A dip in the jet stream was forecast to weaken Songda and push it toward the northeast and away from Taiwan and China, CNN meteorologist Brandon Miller said.

Meanwhile, officials in the Philippines breathed a sigh of relief after being spared a direct hit from Songda, named Chedeng in the Philippines.

“Prayers do work!” was the first sentence of a press release from the Philippine Information Agency.

Philippine officials had ordered the evacuation of tens of thousands of people from coastal areas or areas prone to landslides in heavy rainfall, but the information agency said most of those orders would soon be lifted. A ban on all activity in the Pacific remained, it said.

The Philippines would not be spared wet weather, however. Robert S. Sawi of the Philippine Atmospheric, Geophysical and Astronomical Services Administration said the typhoon would help usher in the rainy season, with heavy rains expected through the weekend, according to the Philippines News Agency.