Heavy rain forecast for Long Island is expected to hit just as temperatures rise this weekend, melting ice from the recent polar-vortex-related deep freeze and in turn causing widespread local flooding.

A chance of snow and freezing rain Friday afternoon comes as temps are expected to rise above the freezing mark into the 40s and above for the first time this week, according to Upton-based National Weather Service meteorologists.

“Ice jam flooding” is possible due to water building up behind ice in local rivers that can cause flooding upstream from the backed-up flow as well as flooding downstream when the ice melts and sends the excess water rushing through, the agency said.

The frozen ground thawing as temps rise sharply into the 50s may also result in “significant runoff” amid rain that could at times be heavy Saturday before tapering off into showers Sunday.

After the region dries out during a sunny start to next week, the forecast calls for weather on LI to stay in the 40s through at least Wednesday.