Robert Murray of FanRag Sports first reported Casilla and the A’s were nearing agreement on a two-year deal. Susan Slusser of the San Francisco Chronicle confirmed the deal.

Casilla has spent the previous seven seasons with the San Francisco Giants, playing an integral role in the team’s World Series wins in 2012 and 2014 with a 0.63 ERA and 15 strikeouts in 14.1 innings over 20 appearances.

The 36-year-old did start to show signs of slowing down last season, though he was hardly the only Giants reliever who struggled in 2016. His strikeout and strikeout-to-walk rates were fine, but opposing hitters did seem to be squaring him up with greater ease.

It’s hardly a surprise to see Casilla start to take a step back. He has pitched in a lot of games for the Giants over the years, recording at least 50 appearances six times in the last seven years, not to mention additional innings in the postseason.

Granted, Casilla was rarely overextended in San Francisco. His innings total ranged from 50.0 to 63.1 since 2009, a testament to Giants manager Bruce Bochy’s ability to get the most out of his relievers.

Casilla was an attractive free agent because of his extended role as the Giants closer, including racking up a career-high 38 saves in 2015.

The A’s have taken a unique approach with their roster this offseason. Ben Nicholson-Smith of Sportsnet.ca reported they offered Edwin Encarnacion a higher average annual salary of $25 million than what the slugger ultimately took from the Cleveland Indians, but the years on the contract were shorter.

After missing out on Encarnacion, per Jeff Passan of Yahoo Sports, A’s general manager Billy Beane gave 36-year-old outfielder Rajai Davis $6 million for one year.

After losing 93 games last season, the A’s are trying to build a more competitive roster in 2017. Casilla likely won’t be their closer, as Ryan Madson is coming off a solid season in the role and is under contract for two more seasons.

However, Casilla does give A’s manager Bob Melvin more length to take advantage of in late-game situations. The team finished 20th in bullpen ERA last season, and its 23 blown saves were the seventh-most in MLB, per ESPN.com.

There was a clear separation at the top of this year’s market for relievers, with Aroldis Chapman, Kenley Jansen and Mark Melancon setting the tone and everyone else following in their wake.

Given Casilla’s age, he may not be the same pitcher two years from now, but his ability to miss bats makes him a safe bet to play a key role in the bullpen for the Athletics in 2017.