OTTAWA — The Ottawa Senators had their biggest offensive output in their last seven games, and needed nearly every bit of it to snap their four-game losing streak.

Mark Stone had a goal and two assists and Mike Condon turned away 35 shots as the Senators hung on to beat the Edmonton Oilers 5-3 Sunday.

Want to stream all 82 Oilers games this season? Sign up for Sportsnet NOW

Ottawa scored six times in a win over the New York Islanders on Dec. 18, but produced just 12 total goals in its next six games before finding its offence against Edmonton.

“The guys putting five up on the board and playing great defensively, that’s how you break those type of streaks, with a gutsy type win,” Condon said.

Zack Smith, Mike Hoffman and Kyle Turris each added a goal and an assist while Tom Pyatt also scored for the Senators (21-14-4).

The Oilers (21-14-7) got two goals from Patrick Maroon and one from Leon Draisaitl. Connor McDavid had two assists and Jonas Gustavsson made 13 saves.

Edmonton entered the third period trailing 4-3 and desperately pressed for the tying goal but Condon shut the door. The Oilers outshot the Senators 17-3 in the period and 29-8 over the final 40 minutes.

“We got into a bit of a tailspin there but it was a fun third and a lot of action,” Condon said.

“The puck was bouncing everywhere in the third period as we were getting chances. I thought we should have won,” said Maroon, who has five goals in his past three games. “I thought in the first period we weren’t that sharp but I felt the second and third gave us a chance where we could have gone 3-1 on a really hard road trip.”

Turris scored into an empty net to ice the game.

The Oilers entered the second period down 2-0 but needed just 63 seconds to tie the game as Maroon scored back-to-back at 5:58 and 7:01 to even the score.

He beat Condon through the legs from in close for the first goal and banked a shot off Senators defenceman Cody Ceci for the second.

McDavid started the play that led to the second goal by stealing the puck at the Ottawa blue line, but his shot on the ensuing breakaway was wide. Maroon picked up the puck along the boards, shot and scored.

“I’m playing with really good line mates, Leon (Draisaitl) and Connor (McDavid) and without those guys some of those goals don’t go in,” Maroon said.

Draisaitl gave the Oilers their first lead of the game when his shot from behind the net hit Condon and went in at 12:59.

Despite having just five shots in the second, the Senators managed to close out the crazy period with two goals to regain the lead.

Stone scored at 13:33 to tie the game and Pyatt put the Senators up 4-3 at 18:14.

“Four’s too many and you don’t win in this league giving up four, yet I don’t think we played that poorly,” Oilers coach Todd McLellan said.

“Kind of mixed emotions and I’ll have to review the game a bit, but I don’t think we gave up a lot but we gave up enough to lose the game.”

The Senators opened the scoring just 3:36 into the game when Smith beat Gustavsson through the legs from the top of the crease after a bit of a scramble around the Oilers’ net.

Seconds later the Oilers nearly tied the game on a backhand shot from Benoit Pouliot that beat Condon, but not the crossbar.

Later in the period, while on the power play, Erik Karlsson took a point shot and broke teammate Dion Phaneuf’s stick. Hoffman then hit the post with a one-timer from the face-off circle before scoring on the exact same play moments later at 14:54 for a 2-0 Senators lead.

“I really liked our first period. It was about paying the price in front of their net and getting the shooting mentality,” explained Senators coach Guy Boucher.

“I thought we were very aggressive and brought a lot of energy into that period but when we came back in the second period, whoops, we didn’t have that shooting mentality.”

Notes: Fredrik Claesson was scratched for the Senators. Brandon Davidson and Jesse Puljujarvi were scratches for the Oilers…Senators forward Curtis Lazar is pointless in 18 games this season…The Senators had scored just three goals in their previous 11 periods before Sunday…McDavid leads the league with 15 multi-point games and has more assists (34) than the top point getter on 14 other teams in the league…Next up for the Senators will be a visit from the Pittsburgh Penguins on Thursday. The Oilers will host the San Jose Sharks Tuesday.