The Rangers knew what to expect: The San Jose Sharks were playing their third road game in four days, and the Blueshirts needed to jump on them early.

Instead, it was another grinding, scoreless first period, without much space to maneuver. Then lightning struck late in the second.

After Carl Hagelin popped a rebound of his own snap shot over goaltender Alex Stalock at 13:01 of the second period, Martin St. Louis and Rick Nash scored a record-setting four seconds apart in the final minute of the period as the Rangers beat the Sharks, 4-0, Sunday night for their second consecutive victory.

Henrik Lundqvist posted his first shutout of the season, making 33 saves and sending the Sharks (4-1-1) to their first regulation loss in six games.

"It was probably our most complete game of the year," Lundqvist said. "They played [Saturday] and were on the road for a while, so we wanted to play a physical, focused game."

The defense looked more cohesive, and with four reconstituted lines -- including a hefty one with Nash, Chris Kreider and rookie Kevin Hayes -- the Rangers played with more grit than they had previously displayed. They grabbed the momentum as Stalock wilted, unable to control rebounds.

"Obviously, there were a couple lucky bounces,'' Hagelin said, "but I think you create your own luck."

While being pounded by Sharks, St. Louis jammed a loose puck between the right post and Stalock's pad at 19:16 of the second period for his first goal of the season.

On the next faceoff, Nash scored his NHL-leading seventh when Stalock didn't corral Dominic Moore's long shot and Nash put the puck by him at 19:20.

It was the fastest pair of goals against an opposing goalie in franchise history. Against the Islanders on Oct. 9, 1991, Kris King scored at 19:45 of the third period and James Patrick added an empty-netter four seconds later.

"They were bad goals," Sharks coach Todd McLellan said. "He [Stalock] knows that. They only needed one bad goal tonight. We didn't give him any run support.''

Then Hayes -- a 6-4 rookie out of Boston College who signed as a free agent and was playing his first game between former college teammate Kreider and Nash -- scored his first NHL goal at 7:18 of the third.

"He shows a lot of poise," Alain Vigneault said. "With his size, he can protect the puck. I thought in our own end, he was in the right position, didn't panic the couple times he got the puck down low, held on to it and made the high-percentage plays."

Hayes -- who played 13:13 with four shots, five hits and three takeaways -- said he and Nash talked throughout the game about positioning.

"In the first period, we were trying to get a feel for each other. We didn't get anything going," he said. "The thing that stood out to me was one shift early in the second period when we were just back-and- forth in the zone, using our big bodies. I just try to get them the puck. A couple times I messed up, but those guys kept telling me to keep calling for the puck."

The experience "was awesome," said Hayes, who had the first-goal puck in his locker and was going to send it to his father. "I should have had one earlier, but it finally went in. I hope that's a springboard to something special."