James Reimer is heading west.

The Toronto Maple Leafs traded Reimer and forward Jeremy Morin to the San Jose Sharks in exchange for goaltender Alex Stalock, forward Ben Smith, and a conditional fourth-rounder in the 2018 NHL Draft.

“James is an experienced NHL goaltender who will help add to our depth at that position as we head down the stretch run of the season,” Sharks GM Doug Wilson said in a statement. “Jeremy gives our group another versatile forward and a player that our coaching staff is familiar with. We’re excited to add them both to our organization.”

Reimer, 27, is 11-12-3 with a .918 save percentage and 2.49 goals-against average in 32 games with Toronto this season. He has spent his entire career with the Maple Leafs organization, backstopping the team to its only playoff appearance since the 2003-04 season.

“It’s sports. It’s hockey. It’s a forever changing thing,” Reimer said of the trade to reporters. “I had a lot of good years here — my whole career has been in Toronto. It’s definitely a weird feeling to be going somewhere else.

“Obviously [Toronto] is building to do things and be successful in the future. The fan base and the whole city, how they can get behind you, it was definitely special…”

Reimer’s contract carries a salary cap hit of $2.3 million and he will be an unrestricted free agent after the season.

The Maple Leafs recalled goaltender Garret Sparks from the Toronto Marlies, the team’s AHL affiliate, after the trade was completed.

Stalock, 28, is in the final year of his contract and will be a UFA at the end of the 2015-16 season. The Minnesota native has appeared in 13 games this season, going 3-5 with a .884 save percentage and 2.94 goals-against average. He had been with the Sharks organization since the club drafted him in the fourth round (112th overall) of the 2005 NHL Draft.

It is the second trade the Maple Leafs and Sharks have completed over the past week as defenceman Roman Polak and forward Nick Spaling were shipped to San Jose in exchange for forward Raffi Torres and two draft picks.

The Maple Leafs originally selected Reimer with the 99th overall pick (fourth round) of the 2006 NHL Draft.

Leafs general manager Lou Lamoriello did not rule out signing the Reimer in the summer.

“That’s certainly behind your mind and I think that’s the best I can answer that,” he said. “I’ve had the good fortune to have players who were traded, not necessarily at the deadline, come back so that’s not something that doesn’t happen in the National Hockey League.”

Lamoriello also defended the return, saying the demand for goaltenders wasn’t strong enough for a better deal, while moving Reimer allows the Leafs to give more of an opportunity to Sparks and Antoine Bibeau.

“All you have to do is look at goaltenders on the teams that are presently in the playoffs, or are close to the playoffs, and there was not a real need for a goaltender in the opinion of the teams,” said Lamoriello. “And if there were a need, there were cap restrictions.

“This was something that we internally made a decision on that we had to give the opportunity to these young goaltenders to see what they could do.”