If it was Ales Hemsky's last game as an Edmonton Oiler, he certainly went out on a high note.

Persistently rumoured to be a likely candidate to be dealt during Wednesday's NHL trade deadline, Hemsky scored a pair of goals and was named the game's first star as the Oilers snapped a three-game losing streak with a 3-2 victory over the Ottawa Senators on Tuesday night.

Hemsky, who has spent all 11 seasons in the NHL with Edmonton, said he just tried to make sure he went out well, if his time with the club is indeed up at the deadline.

"It is hard not to think about it when you are hearing all the rumours, but I have been in this situation for the last four years. I just tried to play my game and not think about it. It was fun.

"It was definitely a nice game for me if it was my last one here, but it is still sad if it comes to an end. It is what it is. It is a business. We'll see what happens."

Oiler forward Jordan Eberle, who had the other goal in the win, said it was great to see the veteran forward have such a strong game during trying circumstances.

"It's got to be tough for him," he said. "For the past four years since I have been here, his name has been on the list of guys on the trade block. That can't be easy, especially with so much social media now. For him to come out and give a performance like that at a time like this, it is awesome."

"There is not much more that he could have done tonight," added Oilers head coach Dallas Eakins. "He was absolutely excellent. He was energetic and entertaining to watch. I found my eyes fixated on him a lot. I thought he was great from the initial drop of the puck.

Taylor Hall had a pair of assists for the Oilers (21-34-8), who remain in second-last place in the NHL despite a 6-2-2 record in their last 10 games.

Jason Spezza and Erik Karlsson responded for the Senators (27-24-11), who have lost three of their last four games in the midst of trying to move up into a playoff spot.

"We started well and then we started trading chances with them and we really couldn't keep up," Karlsson said. "Their goalie obviously made some huge saves for them and we couldn't put it in the net obviously. I think we could have played a little bit smarter."

'It was definitely a nice game for me if it was my last one here, but it is still sad if it comes to an end. It is what it is. It is a business. We'll see what happens.'- Oilers forward Ales Hemsky

Spezza is hopeful the loss didn't turn the Sens from buyers into sellers on deadline day.

"It's a very disappointing loss," he said. "We missed a good opportunity to make up some points. We saw that Detroit loss and not being able to win this game is frustrating.

"We got the first one and then we were a little bit flat through the first period. You have to give them credit too, they defended well. But I still think we needed to find a better way to stay in that game."

Ottawa struck first with a goal just over five minutes into the opening period. Milan Michalek sent a backhand pass from behind the net through a few bodies in front to Spezza, who was able to beat Edmonton goalie Ben Scrivens with a quick shot for his 16th of the season.

Edmonton tied the game up with five-and-a-half minutes left as Nail Yakupov hit Hemsky with a long pass on the power play. Hemsky flew into the Senators zone before cutting in on net and undressing Ottawa goalie Craig Anderson with a backhand deke.

It was Hemsky's first goal since Jan. 12.

Edmonton had a great opportunity to take the lead seven minutes into the second period as Hall picked off a Colin Greening pass and went in alone, beating Anderson with a high shot but ringing the puck off the crossbar.

Hemsky wasn't done yet. With 11 minutes left in the middle frame, Sam Gagner hit Hemsky with a drop pass and he picked the corner with a shot for his ninth of the season while Hall screened Anderson in front of the net.

Scrivens kept it 2-1 with four minutes left in the second as he came across quickly to rob Bobby Ryan on an attempt to deflect a shot from in tight.

Edmonton made it 3-1 four-and-a-half minutes into the third period as a Boyd Gordon shot deflected to Eberle at the side of the net and he had an easy tap-in for his 20th of the season.

Right after Edmonton's Nick Schultz fished a puck out of harm's way from behind Scrivens, the Senators made it a one-goal game with just under three minutes left to play. Karlsson walked around a pair of defenders and slipped a shot under the Oiler goalie's arm.

Ottawa pulled Anderson late in the contest, but couldn't get the equalizer.

The Senators play the third game of a four-game road trip in Calgary on Wednesday. The Oilers next play host to the New York Islanders on Thursday.