BOSTON -- David Krejci thought there were a few seconds left before overtime.
He was surprised when he saw how close it was.
Krejci tipped in a shot with eight-tenths of a second left in the third period to lift the Boston Bruins to a 2-1 win over San Jose on Thursday night, sending the Sharks to their first regulation loss of the season.
"Actually I thought there might be more than 10 seconds, maybe 15, 20 seconds left," he said, breaking into a smile. "Then we scored it Luc (Milan Lucic) said `Look up.' I looked up and it was .8. It was even sweeter."
"I was pretty excited to get my first in a Bruins' uniform and to get it at home, get it in a tough game, and to get it unexpectedly," Iginla said. "It's kind of like you throw it at the net and `Wow.' That was cool. It's been a while. You always hope it's coming."
The Sharks dominated the Bruins for most of the night until Krejci sent the fans to the streets happy, looking to watch the end of the Red Sox World Series game about 3 miles away.
Krejci, positioned in the slot, tipped defenseman Adam McQuaid's shot from the point between Niemi's pads for the game-winner.
"There was a guy in front, so I thought just to watch the puck and I thought I had it, but he tipped it kind of back the same way where I was coming from," Niemi said. "Yeah, tough way to lose with just a little bit left in the game."
The Sharks (8-1-1) tied the game at 1-all on the opening shift of the third period when Marleau swooped in from the left wing, slipping a rebound past Rask 18 seconds into the period.
Seconds later, Rask came across the crease and made a blocker save on Tomas Hertl at the end of a 2-on-1 break. The Sharks kept up the pressure with a flurry of shots over the next 2 minutes.
"I looked up at the clock and was happy there was .8 ," Boston coach Claude Julien said.
The Bruins had an excellent chance with 2 minutes left in regulation when Niemi dropped to make a pad save on Krejci's bid from in close.
Rask's play kept Boston in this game.
"Their goalie played well tonight and made a lot of key saves for them," Marleau said.
Iginla had given Boston a 1-0 lead with 1:12 left in the second when he collected the rebound of Dennis Seidenberg's shot near the bottom of the right circle, firing a shot that trickled into the net after hitting Niemi's right pad and slipping between his legs.
Signed to a one-year free-agent deal that could earn him as much as $6 million with incentives, Iginla had a big smile on his face as he went over to the bench to accept congratulations from his teammates.
The 36-year old winger vetoed a trade that would have sent him to the Bruins when they had a deal in place at last season's trading deadline. He ended up accepting a deal to Pittsburgh, which was swept in the Eastern Conference finals by Boston last spring.
Niemi had robbed Patrice Bergeron about 2 minutes before Iginla's goal when he came across the crease to make a glove stop at the end of a 2-on-1 break.
Bruins winger Shawn Thornton unloaded a slap shot that caromed off the left post 3 minutes into the second.
The Bruins played the first period like many of their fans from the slimmed-down crowd -- like they had something else on their minds. With the Red Sox hosting Game 2 of the at Fenway Park, there were a decent number of empty seats despite the club's 170th straight sellout of TD Garden.
The arena, which was less than a third full about 10 minutes before game time, ended up being only about three-quarters filled, with many open seats in the club and lower sections.
San Jose outshot Boston 16-3 in the opening period -- at times, controlling the puck for lengthy stretches in the Bruins' zone.
Boston's GM Peter Chiarelli said in a statement before the game that winger Loui Eriksson was "diagnosed with a concussion and will be out indefinitely" after a hit on Wednesday from Buffalo's enforcer John Scott, who was issued a match penalty for charging. Scott was suspended indefinitely by the NHL on Thursday. It ended Eriksson's streak of consecutive games played at 148. ... It was the Sharks' second game of a season-long five-game road trip. They also play at Montreal, Ottawa and the Los Angeles Kings before returning home to face Phoenix on Nov. 2. ... Boston defenseman Dougie Hamilton faced his brother, Freddie, a center with the Sharks.