The Giants locked up Bumgarner through 2017 with a club/vesting option for 2018 and a club option for 2019. The deal carries through his arbitration years and his first year of free agency.
It wasn't disclosed how much the 22-year-old hurler will make.
Bumgarner is 1-1 with a 3.97 ERA this season. In 54 starts over the past four seasons, he is 21-20 with a 3.12 ERA.
"Preserving our core pitching for the long term remains a top priority for the Giants and today's extension certainly helps further that goal," said Brian Sabean, the Giants senior vice president and general manager. "Madison has already proven that he is one of the best left-handed pitchers in the game today and we are confident that he will continue to succeed for many years to come."
Wisconsin business offering 'therapeutic cuddling' forced to close
Reindeer recovered after escaping from Santa during lighting ceremony