Vancouver, Canada’s third-largest city, is cut off from the rest of the country by land after days of storms caused flooding and mudslides that have blocked major highways and rail lines.

In response to what local officials are calling the storm of the century, British Columbia declared a state of emergency on Wednesday that will allow it, if necessary, to prohibit non-essential travel, hoarding of goods, and price gouging.

“These are extraordinary events not measured before, not contemplated before,” Premier John Horgan told reporters, saying that the volume of rain that fell on Merritt, a town of 7,000 people northeast of Vancouver, was three times the historical high.

The deluge left the Port of Vancouver, Canada’s largest port, stranded without access to trucks and rail cars to get goods in and out of the region. Water and landslides have blocked the tracks of the nation’s two major railways and washed away parts of the main east-west road artery, the Trans-Canada Highway.

With all three major highways through the province’s interior shut, panic buying has set in.

“Everyone, realizing that all the highways are cut off for the next little while, basically cleared out the grocery stores,” Stephen Way, a resident of Kamloops, about 450 kilometers (280 miles) northeast of Vancouver, said by phone. “It’s just like the beginning of the Covid pandemic. Everything is gone from toilet paper to fresh produce to meat.”

Grocery chain Sobeys Inc. said all shipments in and out of the Vancouver region are on hold due to current road conditions and asked customers to “maintain their regular shopping habits.” Public Safety Minister Mike Farnworth said the government is monitoring reports of gasoline stations running out of fuel.

Horgan warned residents against hoarding. “You do not need 48 eggs, a dozen will do,” he said at a news conference.

It’s the second time in less than five months that British Columbia—a major conduit to Asian markets and home to one of the busiest ports on the West Coast—has been paralyzed by extreme weather.

The impact “is expected to be significant and will have a cascading effect,” says Wade Sobkowich, executive director of the Western Grain Elevator Association. There will be vessel delays at a time when freight rates and demurrage are already high because of supply chain logjams, he said. The association represents major shippers including Viterra Inc. and Richardson International.

More than 1,500 rail cars carrying grain are estimated to be idled in the Vancouver corridor, up sharply from 947 the prior day, Ag Transport Coalition data show.

“The picture looks bleak for the coming days,” Ag Transport said in a report Wednesday.

Canadian Pacific Railway Ltd. and Canadian National Railway Co. are still completing their inspections and haven’t identified when they might be able to bring lines back into operation.

The Trans Mountain pipeline, which carries oil from Alberta to the Vancouver area and onward to refineries in Washington state, was shut on Sunday due to rain. Teams are working on restart plans for the pipeline and finished “initial assessment of the affected areas by air” on Tuesday, the company said in a release.

“It has been a year of insane weather whiplash for Canada,” said Jeff Masters, meteorologist for Yale Climate Connections.

Some of the worst flooding has been near the town of Lytton, which grabbed global headlines in June when it burnt to the ground after recording the highest temperature ever in Canada—49.6 degrees Celsius (121 degrees Fahrenheit).

Summer wildfires almost certainly raised the threat of floods for the region, Masters said. The burn-scarred Earth lets water run freely and raises the risk of flowing mud and debris, which can cause even more damage. This year’s heat waves, which scientists say couldn’t have reached records without climate change, raised the risk of fires.

So this creates a situation where the flooding was likely made worse by last summer’s climate troubles, he said. “When you want to talk attribution, it is not just the event that is going on but the event that preceded it.”