The Los Angeles Angels and second baseman David Fletcher have agreed to a five-year contract extension worth $26 million, the team announced hours before its season opener on Thursday.

Fletcher’s deal includes two club options, giving the Angels an opportunity to buy out as many as three free-agent years. Angels general manager Perry Minasian said extending Fletcher was “a priority for us all spring training,” but the two sides set a deadline of Opening Day.

“It went down to the deadline, but we were able to get this thing done,” Minasian said. “We’re pumped.”

Fletcher, 26, has batted .292/.346/.386 with 77 extra-base hits in 283 games from 2018 to 2020, producing 6.7 FanGraphs wins above replacement. He’s listed at only 5-foot-9 and doesn’t hit for much power. But the Angels value his ability to consistently put the ball in play — Fletcher has struck out only 123 times in 1,190 career plate appearances — and provide above-average defense at three infield positions.

Fletcher’s deal will pay him $6.5 million in what would have been his first year of free agency, and the two club options are valued at $8 million and $8.5 million for 2026 and 2027, respectively. Over these next three years, his salary will jump from $2 million to $4 million to $6 million, an industry source told ESPN’s Jeff Passan.

“I wouldn’t want to be anywhere else,” Fletcher, who attended high school 15 miles away from Angel Stadium, said. “Ideally if it were up to me I’d play here my whole career. I have a lot of work to do to make that happen, but yeah, I’m excited to get this deal done.”