DALLAS -- As good as Toronto goaltender Jonas Gustavsson was good in the shootout, he felt he got a bit lucky.
Lupul fired a shot through the pads of Stars goaltender Kari Lehtonen for Lupul's second shootout goal in as many tries this season. Then Gustavsson had to back into his net to deny Ribeiro after a nifty move to secure the extra point for the Leafs.
"I tried not to be too far out," said Gustavsson, who stopped 26 shots in regulation and overtime. "I knew you've got to get deep or he'd tap it in."
Gustavsson also got a break in the second round when a shot by Dallas' Jamie Benn rang off the goalpost.
Lupul registered his second shootout goal in two tries this season.
"It was a good win for us," Lupul said. "We didn't play that well in the second period, we let them back in the game, but we played really well in the third period and it was a hard-fought game right to the end. Tonight it took an effort from everyone, but we got it done."
Clarke MacArthur had given Toronto a 3-2 lead at 6:55 of the third period.
Tim Connelly slid a pass from the right boards toward the net while MacArthur barreled up the middle of the ice. MacArthur deposited his eighth goal of the season past Lehtonen on Toronto's first shot of the final period.
But Radek Dvorak pulled Dallas even at 3 at 12:47 of the third, notching his second of the season from low in the right circle.
Leafs captain Dion Pfaneuf added a power-play goal and teammate Joey Crabb connected at even strength.
"It's a big two points for our team coming in here," Pfaneuf said. "I thought they played really well. They're a real hardworking team. They're where they're at in the standings in the West for a reason, so we knew it would be a big test for us. I thought we really stuck to it for the full 65 minutes and the shootout to pull out two really big points."
Eric Nystrom scored twice and Lehtonen stopped 20 shots.
The game drew a sellout crowd of 18,532, the first sellout for the Stars this season, with the help of a vocal contingent of Maple Leaf fans.
Nystrom gave the Stars the lead when he beat Gustavsson on a wrist shot from the slot at 4:03 of the opening period.
The Leafs tied it at 1 at 10:55 of the first on Crabb's deflection, his fourth goal of the season.
Phaneuf's power-play goal -- his third of the season -- sent Toronto ahead at 14:53 of the first on a slap shot that dribbled through Lehtonen's pads and over the goal line.
Nystrom drew Dallas even at 2 at 4:38 of the second period with his sixth goal of the season, converting Dvorak's goal-mouth pass for Nystrom's third career two-goal game.
Nystrom, acquired from Minnesota in a trade on Oct. 12, had only four goals in 82 games for the Wild last season. The Stars traded for him because they needed his salary to reach the cap minimum, but they've found that he can be a force on the third and fourth lines.
"I was passed over by 29 teams twice, so I've kind of got a chip on my shoulder against the world," Nystrom said. "I'm just trying to prove to myself and everybody that I can be a powerful player in this league and my linemates have been awesome, the team's been playing well and I'm just so happy to be a part of this organization."
Toronto D Carl Gunnarsson and C David Steckel both left with undisclosed injuries in the second period and did not return. ... Leafs G James Reimer has returned to practice, the next step in his recovery from concussion-like symptoms, and is expected to be activated within the next 10 days. ... Stars LW and captain Brenden Morrow (multiple minor injuries) missed his second straight game and is day to day. He's expected to return next week. ... This was the only meeting between the teams this season. Last season the teams played their only game in Toronto, a 4-1 win for the Maple Leafs. ... A group of Toronto players and staff attended Thursday's Miami-Dallas NFL game in a luxury suite at Cowboys Stadium. ... Dallas is at Phoenix on Saturday. Toronto ends a four-game trip against Anaheim on Sunday.