UNIONDALE, N.Y. (AP) -Martin Brodeur finally lost.
Brodeur stayed three wins behind Patrick Roy's record of 551. The earliest Brodeur can break the mark will be March 17 at home against Chicago.
"I would like to have played better," Brodeur said. "I felt good, but it just wasn't going my way."
The loss snapped a four-game winning streak for the Devils since the superstar goalie returned.
Radek Martinek, Kyle Okposo, Jeff Tambellini and Blake Comeau also scored for the Islanders, 8-2-2 in their last 12 home games. That run that includes the Devils' previous loss, two weeks ago on Feb. 21.
Brodeur was yanked after stopping 20 of 26 shots in the first two periods.
Bergenheim completed his first NHL hat trick with an empty-netter in the final second.
"My first NHL goal was an unbelievable feeling," Bergenheim said. "My first NHL hat trick gives me that same feeling."
Brian Gionta, Jamie Langenbrunner and Patrik Elias scored for New Jersey. Kevin Weekes played the final period in relief.
Joey MacDonald made 35 saves for the Islanders, who were ahead 3-1 before Bergenheim scored at 1:40 of the second on one of Mike Iggulden's two assists. A little more than a minute earlier, Gionta put the Devils on the board.
"The first one, Iggy made a great play," Bergenheim said . "The second one, I just moved in front, and had room to shoot."
Langenbrunner made it 4-2 on a rebound 4 minutes in, and the Devils kept it there until Comeau's power-play goal at 13 minutes and Bergenheim's wrister at 17:20 gave New York a four-goal lead and ended Brodeur's day.
"They should be embarrassed," Devils coach Brent Sutter said. "Got embarrassed by a bunch of young players. They had seven goals against us. That tells you something."
It was the first time Brodeur has allowed six goals in 162 games since Oct. 21, 2006.
He struggled from the start. Brodeur had gone down on an earlier shot when Martinek beat him from the right circle 1:42 in. On the Islanders' first power play, they went up 2-0 at 10:59 when Josh Bailey fed a beautiful pass in front to Okposo, whose quick one-timer got past Brodeur. Three minutes later, Tambellini got loose on a breakaway and backhanded the puck past Brodeur at 14:05 for a 3-0 lead before New Jersey had even scored.
New Jersey made it 6-3 on a power-play tip-in by Elias at 6:48, but couldn't get closer before Bergenheim wrapped it up by scoring short-handed into an empty net with 0.7 seconds left.
"They came out and played hard," Langenbrunner said. "We weren't ready, and they took advantage of that."
Notes: New York F Trent Hunter fractured his ankle in the game, and will miss the rest of the season. ... The Islanders recalled Iggulden from Bridgeport. He had his first two points in his second NHL game, first with the Islanders.... Islanders F Andy Hilbert picked up the second assist on Comeau's goal for his 100th NHL point.