A man makes his way up High Street in Portland amid the falling snow in this Jan. 4, 2018, file photo.

A winter storm will dump as much as a foot of snow over northern Maine and bring a wintry mix elsewhere as the state prepares to ring in the New Year.

Most of the state from Portland to Madawaska will be under a winter storm warning from 10 p.m. Monday to 10 p.m. Tuesday, while the midcoast to the Down East coast and inland toward Bangor will be under a winter weather advisory from 1 a.m. Tuesday to 1 a.m. Wednesday, according to the National Weather Service.

The weather service warned that the storm could create “hazardous conditions” during the morning commute and New Year’s Eve. “Travel could be very difficult,” a weather advisory reads.

Heaviest snow will accumulate in northern Maine, where 8 to 12 inches are expected from Greenville to Presque Isle to the Canadian border and 12 to 18 inches near Clayton Lake, according to the weather service office in Caribou. Snowfall will lessen somewhat toward Houlton, where up to 6 to 8 inches are expected to accumulate.

While Piscataquis, northern Penobscot and Aroostook counties can all expect snow, Bangor toward the coast will see snow to start before the storm transitions to a wintry mix and rain that could leave behind an icy glaze, the weather service reports. Wind gusts up to 40 mph could accompany the storm along the coast.

Greater Bangor is forecast to see up to 3 to 4 inches of fresh snow, with lessening amounts toward the coast, where 2 to 3 inches are expected in Bar Harbor, 1 to 2 inches in Machias and less than an inch in Eastport, according to the weather service’s Caribou office.

Similar amounts of snow are expected along the southern coast, where 1 to 2 inches are forecast for Belfast, 1 inch in Rockland, 1 to 2 inches in Wiscasset and 3 to 4 inches in Portland, according to the weather service office in Gray. Initial snowfall is expected to transition to rain on Tuesday along the southern coast, the weather service reports.

Snowfall will become heavier inland toward the western mountains, where 8 to 12 inches are forecast from Rangeley to Jackman, according to the weather service’s Gray office.