WINNIPEG - Jonathan Toews knows you don't always have to win pretty this late in the season.

All that counts is getting the win.

Toews deflected in Niklas Hjalmarsson's long shot with 31 seconds left in regulation as the Chicago Blackhawks defeated the Winnipeg Jets 4-3 on Sunday.

"We're going to have to win games in dramatic fashion sometimes, especially this time of year," said Toews, who scored his 25th goal of the campaign. "They're not going to be pretty and winning games by two or three goals, so we're going to have to find ways to squeak them out."

Andrew Shaw, Brad Richards and Patrick Sharp also scored for Chicago (45-24-6).

Dustin Byfuglien scored twice on the power play and Blake Wheeler recorded his fourth short-handed goal of the season for Winnipeg (39-25-12). Andrew Ladd picked up two assists.

Corey Crawford made 31 saves for the Blackhawks, who snapped a two-game losing skid.

Ondrej Pavelec stopped 20 shots en route to snapping his six-game winning streak.

Sharp's tying goal at 6:27 of the third period had the Jets feeling like they were robbed.

Defenceman Toby Enstrom lost his stick when he bumped into a linesman along the boards and then batted the puck with his glove. Sharp picked it up and beat Pavelec with his 14th goal of the season.

"It's like an injury," Winnipeg coach Paul Maurice said. "You know, you're angry when it happens, but there isn't anything you can do about it."

It was hard for the players to swallow, but Ladd noted there was still a lot of time left in the game.

"That's a tough one to take," Ladd said. "We're battling for our playoff lives and something like that happens.

"It's always tough to give up the tying goal on that play, but at the same time it's still a 3-3 hockey game late in the third period and we've got to find a way to take that thing to at least overtime."

Despite the loss, Winnipeg still holds the second wild-card spot in the Western Conference.

Sharp said he was glad to be in the right place at the right time when he scored the tying goal.

"That's an unfortunate play for them, fortunate for us," Sharp said. "We've had our fair share of posts and (pucks) staying out, so it's nice to get a good bounce to go in."

The loss ended Winnipeg's four-game winning streak at home.

Chicago had scored the only goal in the first period before the teams combined for four goals in the second.

With Byfuglien in the penalty box for elbowing, Shaw spun around in front the net and used a rebound off a Brandon Saad shot to score his 14th of the season at 18:30.

Byfuglien tied the game 1-1 with an unassisted goal at 4:34 of the second. His shot went off Crawford into the air and then down and off a defender into the net.

Wheeler made it 2-1 with his team-leading 25th goal on a patient play. After taking a pass from defenceman Tyler Myers, Wheeler skated in and waited to send a low shot behind Crawford's skate at 7:40.

Richards tied it at 16:19, but Byfuglien restored the Jets' lead with 26 seconds left in the period.

Byfuglien fired a blast straight at Crawford from just inside the blue-line, the same spot he had a shot clang off the post seconds earlier. Drew Stafford assisted on the goal, extending his career-high points streak to nine games with four goals and seven assists, the longest active points streak in the league.

The Jets had a power play with just over four minutes to play after Sharp's tying goal, but couldn't capitalize.