SAN FRANCISCO -- As expected, Pablo Sandoval underwent season-ending elbow surgery on Wednesday in Los Angeles. 

The Giants announced that Sandoval had his right ulnar collateral ligament repaired and also had loose bodies removed from the back of his elbow. Sandoval was originally put on the injured list in August but returned Sunday for one last at-bat before heading to Los Angeles. 

Sandoval has had bone chips in his elbow since 2013 but was able to play through it until this summer. He will be out most of next season, but position players can return faster than pitchers, and Sandoval may be able to get back for a chunk of the second half of 2020. He will be a free agent at the end of this season. 

[RELATED: How Sandoval captivated young Giants]

In his third season back with the Giants, Sandoval hit .268 with 14 homers and a .820 OPS that was his highest in eight years. At times in April and May, he was Bruce Bochy's most consistent hitter. Even with all the missed time, he currently leads the Majors with 19 pinch-hits.