Toronto Maple Leafs' Eric Brewer (2) passes the puck as Buffalo Sabres' Tyler Ennis defends during the first period of an NHL hockey game Wednesday, April 1, 2015, in Buffalo, N.Y. (AP Photo/Gary Wiepert)
(The Associated Press)

Buffalo Sabres center Zac Dalpe (20) celebrates his goal as Toronto Maple Leafs goaltender Jonathan Bernier (45) reacts during the first period of an NHL hockey game Wednesday, April 1, 2015, in Buffalo, N.Y. (AP Photo/Gary Wiepert)
(The Associated Press)

Buffalo Sabres' Zac Dalpe (20) celebrates with Andrej Meszaros (41), Cody Hodgson (19) and Matt Ellis (37) after Dalpe scored during the first period of an NHL hockey game against the Toronto Maple Leafs ib Wednesday, April 1, 2015, in Buffalo, N.Y. Buffalo won 4-3. (AP Photo/Gary Wiepert)
(The Associated Press)

Matt Moulson and Matt Ellis scored 1:41 apart in the third period, and the Buffalo Sabres rallied for a 4-3 win over the Toronto Maple Leafs on Wednesday night.

The Sabres overcame a 3-1 second-period deficit and won their second straight, inching closer to moving out of last place. Zac Dalpe and Cody Hodgson also scored in a matchup of cross-border rivals that featured a predominant number of fans wearing Maple Leafs jerseys.

Ellis added an assist, and Brian Gionta set up two goals for Buffalo (22-47-8), which moved to within two points of 29th-place Arizona.

James van Riemsdyk, Eric Brewer and Nazem Kadri scored for Toronto (29-43-6), which squandered a chance to win three straight for the first time since a six-game run from Dec. 10-16. The Maple Leafs are 10-34-3 since.

Buffalo's Anders Lindback made 24 saves, including a pair of key stops against Phil Kessel in the final minute.

Moulson tied it with a power-play goal 1:33 into the third period. Gionta started the play at the left boards and sent a no-look pass down low to Johan Larsson, who quickly fed the puck into the slot for Moulson's one-timer.

Ellis was set up by Nikita Zadorov, who sped up the right wing and sent a pass into the middle. Ellis cut across to draw out goalie Jonathan Bernier and shoveled the puck into the open left side.

While Ellis and his teammates celebrated, some Sabres fans joined their Maple Leafs counterparts by sitting quietly following the sudden turn of events.

A large contingent of Sabres fans are openly rooting for Buffalo to finish 30th and be guaranteed a shot at selecting one of two highly touted draft prospects: Erie Otters center Connor McDavid or Boston University center Jack Eichel.

The pro-losing group made its voices heard in Buffalo's previous home game, a 4-3 overtime loss to Arizona on Thursday. That's when notable cheers went up each time the Coyotes scored.

Before the opening faceoff on Wednesday, fans were overheard chanting: "We want McDavid!" One fan had a banner that read: "Embrace The Tank," in reference to wanting Buffalo to bottom out.

Fans wearing Sabres jerseys in the upper bowl cheered when the Maple Leafs scored, and patted a banner stuck on the wall behind them that read: "(hashtag)PRAY for McDAVID."

After Dalpe opened the scoring less than 7 minutes in, the Maple Leafs scored the next three, capped by Kadri's goal at 13:24 of the second period.

The Sabres responded 30 seconds later when Hodgson scored on a wraparound. It came after he gathered a loose puck behind the net after Andre Benoit's point shot sailed wide.

NOTES: Sabres C Tyler Ennis returned after missing two games with a lower-body injury. That prompted the team to return forward Tim Schaller to AHL Rochester. ... Sabres D Rasmus Ristolainen didn't play because of flu symptoms. ... The Maple Leafs, 8-26-5 on the road, are assured of finishing with their fewest road wins in an 82-game season. Their previous low was 12, set in the 1996-97 season and matched in 2009-10.