This was winning ugly, baby.

The Edmonton Oilers cruised to a 4-1 lead 22 minutes into the game, then blew it, allowing a short-handed goal by Eric Staal and a prayer through traffic from Jeff Skinner in the dying stages of the third period to tie it.

But the boys in blue and orange cashed in on an overtime power play when Justin Faulk tried to bounce Ryan Nugent-Hopkins’ face off the boards.

Jordan Eberle stuffed home a goalmouth shot 1:48 into the extra frame for a 5-4 victory.

As victories go, it looked like a pair of brown socks trying to coexist with a nice black tuxedo.

It didn’t look good, but the Oilers still left Rexall Place with two points.

“Not the prettiest win by any means,” said Nugent-Hopkins, who had one of three first-period goals along with Taylor Hall and Nail Yakupov as they beat up on Sherwood Park’s Cam Ward in the Hurricanes net.

“Not our best third period, but we battled to get the power play goal.”

The Oilers had a five-minute power play before Skinner’s 50-footer with former first-round draft Riley Nash sent off for plowing Corey Potter’s head into the end-wall, but did nothing with it. They didn’t throw a second gift away when Faulk was whistled for boarding, however.