BUFFALO -- Frank Vatrano scored two goals in a span of 2:35 in the second period for the Anaheim Ducks in a 4-3 win against the Buffalo Sabres at KeyBank Center on Monday.

Troy Terry had a goal and two assists, Mason McTavish had three assists and John Gibson made 34 saves for the Ducks (20-33-2), who won for the second time in three games and bounced back after a 9-2 loss to the Toronto Maple Leafs on Saturday.

"It was big," Vatrano said. "We weren't happy with it, had a good practice yesterday and kind of put it behind us. Came out a little flat, but I think we had a good last 40 minutes of that game."

Dylan Cozens had two assists, and Ukko-Pekka Luukkonen made 11 saves for the Sabres (24-27-4), who have lost four of six.

"I think we were just sloppy with the puck," Buffalo center Tage Thompson said. "Obviously, I had a bad turnover that cost us, and all the goals they got were just gifts that we gave them. They didn't really have to work for anything. We just gave them free chances, free opportunities, and you can't do that."

ANA@BUF: Vatrano scores scores in tight for equalizer

Jordan Greenway gave Buffalo a 1-0 lead at 9:07 of the first period when he took a pass from Cozens above the right circle and scored stick side on Gibson.

Adam Henrique tied it 1-1 at 10:10 after being left alone in front.

The Sabres outshot the Ducks 15-4 in the first, when Gibson was sharp. He stayed tight to the left post to stop Peyton Krebs point blank at 2:15 and denied Greenway (4:31) and Thompson (17:20) on respective breakaways.

"I forget to talk about him sometimes because he just is like that every night for us," Terry said. "He really is the backbone of our team. Some games you almost take it for granted and we hang him out to dry. It's our job to give him as much support as we can, and some of the saves he made tonight were just outrageous."

Thompson's power-play goal at 8:10 of the second period, a one-timer from the left circle, put Buffalo ahead 2-1.

ANA@BUF: Thompson goes post and in with one-time PPG

Vatrano tied it 2-2 at 11:59, poking in a shot from McTavish that squeaked past Luukkonen.

He then completed a 2-on-1 with McTavish at 14:34 to put the Ducks ahead 3-2.

Zach Benson deflected Henri Jokiharju's shot to tie it 3-3 at 15:20.

Terry's shot went under Luukkonen's left arm and trickled into the net for a 4-3 Anaheim lead at 18:56.

"I just kind of got it low and, kind of ran out of space," Terry said, "so I just tried to make a quick move out and just get it on net. I think it went under his arm or something. It's just one of those goals. Sometimes you put one on the corner, and you think it's for sure going in and then the goalie makes a good save. That was just an in-tight goal that just happened to find a way through."

Buffalo pushed for the tying goal in the third period, outshooting Anaheim 10-2. Gibson got a piece of JJ Peterka's shot on a breakaway at 6:24 and later stretched out his glove to hold onto a Thompson's attempt on the doorstep at 11:39.

Thompson had nine shot attempts, including four on goal.

"Tage, he's doing the right things," Sabres coach Don Granato said. "I think probably in his own head a little bit pressing. Evident on the breakaway, the chances he had … I think if he's feeling it, he's probably elevating it over the glove."

NOTES: McTavish (136 games) became the fifth-fastest player in Ducks history to reach 80 NHL points, behind Paul Kariya (80 games), Bobby Ryan (105), Trevor Zegras (108) and Ryan Getzlaf (121). … Terry's 11th three-point game tied Jakob Silfverberg and Scott Niedermayer for ninth in Anaheim history. … The Sabres recalled defenseman Kale Clague and goalie Dustin Tokarski from Rochester of the American Hockey League before the game. Tokarski backed up Luukkonen in place of Eric Comrie, who was scratched with an illness. … Referee Kevin Pollock left in the first period and did not return after he was injured when Greenway accidentally slid into him in the corner. The remainder of the game was played with one referee and two linespersons.