HONOLULU (AP) — Hawaii residents rushed to grocery stores Tuesday to stock up on bottled water, ramen and toilet paper as they faced the threat of heavy rain, flash flooding and high surf from a powerful and erratic hurricane expected to churn close to the islands or directly over them.

On Tuesday night, the National Weather Service announced that Hurricane Lane had strengthened to become a Category 5 hurricane, which means that it is likely to cause catastrophic damage with winds 157 mph or above. The hurricane is about 500 miles (804 kilometers) southeast of Honolulu.

Earlier Tuesday, the weather service issued a hurricane warning for Hawaii island. A hurricane watch was issued for Oahu, Maui and other smaller islands, meaning tropical storm-force winds, excessive rain and large swells could arrive starting Wednesday.

Hurricane Lane "is forecast to move dangerously close to the main Hawaiian islands as a hurricane later this week, potentially bringing damaging winds and life-threatening flash flooding from heavy rainfall," the weather service's Central Pacific Hurricane Center warned as it got closer to the state.

The storm had been moving west but is expected to turn northwest toward the state Wednesday. There's some uncertainty to Lane's path — whether it moves north or south, meteorologist Gavin Shigesato said.

"It is much too early to confidently determine which, if any, of the main Hawaiian islands will be directly impacted by Lane," the weather service said.

But the hurricane center said the storm will move very close to or over the islands from Thursday through Saturday. Even if the center of Lane doesn't make landfall, the islands could be walloped with rain and wind.

Maui County and Big Island schools will be closed starting Wednesday, the state Department of Education said. All after-school activities statewide are canceled for the rest of the week.

Hawaii Gov. David Ige is allowing non-essential state employees on the Big Island and Maui to go on administrative leave from Wednesday to Friday as Hurricane Lane approaches. Employees on Hawaii and Maui islands who work in disaster response as well as in hospitals and prisons are required to report to their jobs, the governor said.

The east side of the Big Island has taken the brunt from previous storms and is still reeling after lava from an erupting volcano wiped out entire neighborhoods. But early indications showed that the south end of the island up to the western side would be taking the brunt of the storm.

"At this time, it looks like maybe Puna will be spared," county Managing Director Wil Okabe said of the beleaguered, rural district. "But you never know."

Officials were urging residents across the islands to prepare.

"People are getting ready, which is exactly what we want," Maui County spokesman Rod Antone said. "I know people are taking trips to Costco, buying ramen, rice, the usual. Toilet paper."

He reminded people to have emergency kits ready and to "withdraw cash. Remember, if the power goes out, ATMs aren't going to be working."

Hawaiian Airlines is waiving change fees for tickets to, from, within and through Hawaii from Tuesday to Sunday.

Some customers were buying cases of bottled water at Island Grocery Depot in Kahului, Maui, manager Brian Arakaki said. He planned to call in more workers to cope with an expected afternoon rush.

On the south side of the Big Island, workers at Mizuno Superette in Pahala also were bracing for a busy afternoon.

"Right now, it's nice, everybody's calm," said Carla Andrade, a store clerk. "When everybody finishes work, they'll have time."

___

Associated Press journalist Dan Joling in Anchorage, Alaska, contributed to this report.