SAN FRANCISCO — The Giants avoided arbitration with outfielder Gregor Blanco, agreeing to a two-year deal that will pay the veteran $7.5 million over his final two years before free agency. The deal, which has not yet been made official, leaves Brandon Belt, Brandon Crawford and Casey McGehee as the club’s only arbitration-eligible players.

Blanco had filed for $4 million Friday when the sides exchanged arbitration figures, with the Giants countering at $3.3 million for the 2015 season. This deal gives both sides cost certainty, paying Blanco $3.6 million in 2015 and $3.9 million in 2016. The 31-year-old has been a reliable fourth outfielder and part-time starter for the past three seasons and finished the 2012 and 2014 World Series runs as a key contributor.

Blanco had a .260/.333/.374 slash line last season while playing a career-high 146 games. Because of his strong outfield defense, Blanco has always rated higher through advanced metrics than traditional ones, and he’s especially valuable at spacious AT&T Park. Over the past three seasons, Blanco ranks fifth among Giants position players in WAR (7.2), finishing just behind Angel Pagan (7.8 WAR), the man he often replaces in the lineup. With Nori Aoki now in the fold, Blanco again moves down to the fourth outfielder role for which he is best suited.

The Giants hold a club option on Aoki for the 2016 season, giving them control of all four of their veteran outfielders through the next two seasons. Pagan, like Blanco, is signed through the 2016 season. Hunter Pence is signed through 2018. The Giants now can turn their focus to the infield, where Belt could be a tricky arbitration case and Crawford could be in line for a deal that buys out his arbitration years.

Belt filed at $4.5 million after a year in which he lost significant time to two injuries; the Giants countered at $3 million, just above the $2.9 million that Belt earned in 2014. Ordinarily, the 26-year-old first baseman would be in line for a bigger raise, but he played just 61 games last season after a Paul Maholm pitch broke his thumb during a game against the Dodgers in May and a wayward Marco Scutaro throw during batting practice in July left him with a serious concussion.

Crawford filed at $3.95 million, and the Giants countered at $2.4 million. McGehee, acquired in a December trade with the Marlins, filed at $5.4 million and saw the Giants come back at $4 million. The club already has reached deals with Yusmeiro Petit ($2.1 million), Travis Ishikawa ($1.1 million) and Hector Sanchez ($800,000).

Otto Warmbier was arrested in January 2016 at the end of a brief tourist visit to North Korea. He had been medically evacuated and was being treated at the University of Cincinnati Medical Center when he died at age 22.