Updated

CHICAGO (Reuters) - Joe Thornton scored the decisive goal in the third period to lead San Jose to a 5-3 triumph over Chicago on Thursday as the Sharks beat the Blackhawks for the third time in as many meetings this season.

Chicago's Troy Brouwer and Brian Campbell both scored in a 22-second span to erase a two-goal deficit and tie the game 3-3 at the end of the second period.

However, the Sharks got a score from Thornton at 7:13 in the third and Ryane Clowe added an empty netter in the final seconds to end a two-game losing run for San Jose.

"We battled back and knew we were in for a dogfight in the third period," Campbell told reporters. "The effort was there, but I don't think sometimes the smarts were there."

Patrick Sharp gave Chicago a 1-0 lead in the first period before San Jose took control with three unanswered goals from Scott Nichol, Benn Ferriero and Dany Heatley.

The Sharks (20-13-5) have a trio of wins against the Blackhawks (20-16-3) over the last month, reversing the fortunes of last season's playoffs when they were swept out of the Western Conference Finals by Chicago.

San Jose goaltender Antti Niemi made his first appearance at the United Center since helping the Blackhawks win the Stanley Cup a season ago and finished with 26 saves.

Niemi left Chicago to sign with the Sharks in the offseason and is now 3-0 against his former team.

"It was a funny feeling (being back)," Niemi said. "Flying into O'Hare, seeing the skyline and then seeing the Blackhawks trainers this morning . it made it feel like a little more than just one game."

Blackhawks goaltender Marty Turco made 20 saves but his team lost their second straight.

Chicago is playing without captain Jonathan Toews who injured his shoulder on Tuesday against St Louis and is expected to miss two weeks.

(Editing by John O'Brien)