NEW YORK (AP) The Calgary Flames have had trouble winning in New York in recent seasons. Opportunistic scoring and stellar goaltending changed that on this trip.

Johnny Gaudreau and Garnet Hathaway each scored twice and backup goalie David Rittich made 44 saves as the Flames snapped a six-game losing streak at Madison Square Garden with a 4-1 victory over the Rangers on Sunday night.

"I felt great and I want to say thank you to my defense," said Rittich, who won for the second time this season as the Flames improved to 5-3-0 and scored three or more goals for the seventh straight game. "We know we had to be better in the third period and we got the two points."

Mika Zibanejad scored for the Rangers, the last-place team in the Metropolitan Division at 2-5-1.

Gaudreau opened the scoring at the 17-minute mark of the first period, backhanding the puck past Henrik Lundqvist. Sean Monahan picked up the assist.

Hathaway made it 2-0 at 12:21 of the second with his first goal this season. Gaudreau scored again at 14:55, extending the lead to 3-0 with his fifth of the season. Flames captain Mark Giordano assisted on the score, which was Gaudreau's 300th career point.

"It's a cool accomplishment," the 25-year-old Gaudreau said of the milestone. "Obviously, it makes it better with the team winning when you get an accomplishment like that, as well."

The Rangers were coming off an overtime loss at Washington on Wednesday after winning in a shootout over Colorado the previous night. The Rangers have had trouble scoring goals under new coach David Quinn.

New York has yet to win in regulation. The Rangers have just 19 goals in their first eight games, including one shootout win and one in overtime.

"We have to find ways to score goals." Quinn said. "We've got to be more tenacious with our shooting mentality. It's frustrating."

Rittich, an undrafted 26-year-old goaltender from the Czech Republic, made 12 saves in the first period, 13 in the second and 19 in the third.

"We played better as the game went along and Ritter was great," Hathaway said. "To have a player like that is a big part of this team."

Rittich's lone blemish was Zibanejad's power-play goal at 6:41 of the third. Zibanejad's third goal this season was assisted by Neal Pionk and Mats Zuccarello.

The Rangers had an excellent chance to narrow the deficit just over a minute later, but Rittich made successive saves on Jesper Fast and Zibanejad. Rittich denied Filip Chytil on a backhand from the slot with four minutes left.

Hathaway completed the scoring for the Flames with his second goal at 18:07 of the third.

"It's too bad. I feel like these types of games are starting to add up, unfortunately," said Lundqvist, who made 22 saves in defeat. "We are playing good enough to win games but we are not finding ways to win games. It's obviously something we need to change fast."

Zuccarello echoed Lundqvist's growing angst as the Rangers struggle to get wins.

"We created a lot of chances and we can sit here and say that we didn't play a bad game, but we lost," said the 31-year-old Norwegian forward who leads the Rangers with six assists. "So, it's not good enough. We have to come to practice, talk about it and see what can do better."

The Rangers came into the contest with a 10-1-1 record against the Flames, starting with a 2-1 win at home on Nov. 22, 2010.

Gaudreau, who leads the Flames with 12 points, was a teammate of Ranger forwards Kevin Hayes and Chris Kreider at Boston College when the Eagles won the national championship.

Gaudreau was a fourth-round pick by the Flames in the 2011 draft. He has points in seven of Calgary's eight games, so far.

"We found a way to score a goal towards the end of the first period, got our legs moving in the second and found a couple goals," Gaudreau added. "Ritter obviously played really well for us tonight."