Turns out, the New York Mets were ready and willing to spend this winter. More than just a few bucks, too.

All-Star pitcher Jason Vargas and the Mets agreed to a $16 million, two-year contract Friday, adding depth to a New York rotation that's been riddled by injuries the past two seasons.

The deal is pending a physical, a person familiar with the agreement said, speaking on condition of anonymity because it had not been announced.

Another person familiar with the contract said it includes an $8 million club option for 2020 with a $2 million buyout, and Vargas can earn up to $1.5 million each year in performance bonuses. That person also spoke on condition of anonymity because the deal was pending a physical and had not been announced.

Vargas went 18-11 with a 4.16 ERA for Kansas City last season, making his first All-Star team and tying for the major league lead in wins. He faded in the second half, however, and the 35-year-old lefty had been among more than 85 free agents seeking a job as spring training opened this week.

While other teams have been reluctant to shop, Mets general manager Sandy Alderson, perhaps sensing an opportunity for bargains, got busy filling holes and adding pieces late in the offseason. He signed free agent right fielder Jay Bruce, first baseman Adrian Gonzalez, third baseman Todd Frazier and infielder Jose Reyes before rounding out the haul with Vargas.

Coming off a 70-92 season that followed consecutive playoff appearances, New York also signed reliever Anthony Swarzak to a $14 million, two-year contract in December.

All told, the Mets have guaranteed a little more than $88 million to free agents this offseason, after ownership was criticized by fans early on for being stingy.

Vargas, traded by the Mets to Seattle in December 2008, could be in camp with New York by Monday. He would join a gifted but fragile rotation that includes three other All-Stars in Jacob deGrom, Noah Syndergaard and former ace Matt Harvey, who can become a free agent after this season.

Harvey, Steven Matz and Zack Wheeler, in particular, have spent much of the past two years on the disabled list. Even when they did pitch last season, they mostly struggled.

Vargas would give the Mets another accomplished starter, this one a soft-tossing lefty to go with all their power arms. He also would be reunited with new pitching coach Dave Eiland, who held the same job in Kansas City, where Vargas compiled a 34-23 record over the past four years.

New manager Mickey Callaway has expressed interest in using a six-man rotation at times. Robert Gsellman, Seth Lugo and Rafael Montero also provide insurance.

Syndergaard, deGrom, Harvey, Matz and Wheeler were all fully healthy when camp opened this week, the Mets said.

The move also means five of New York's top six starters have undergone Tommy John surgery at some point in their professional careers. Vargas had his left elbow ligament replaced in 2015 and made just three starts in 2016 before throwing 179 2/3 innings over 32 outings last season.

Before getting injured, Vargas was 5-2 with a 3.98 ERA in nine starts for the 2015 Royals team that beat the Mets in the World Series. He did not pitch in the playoffs that year, but went 1-0 with a 3.52 ERA over three postseason starts for Kansas City in 2014.

Vargas is 85-81 with a 4.17 ERA in 12 big league seasons with the Marlins, Mets, Mariners, Angels and Royals. He surpassed 192 innings each year from 2010-12 and threw 187 in 2014.

The left-hander made two starts for the Mets in 2007, going 0-1 with a 12.19 ERA. He missed the 2008 season because of a torn labrum in his hip.

Vargas was 12-3 with a 2.22 ERA after winning his seventh straight start on June 30 last year. His ERA rose to 4.23 when he lost his fourth in a row on Sept. 5, but then he won four of his final five outings.

With the Mets, Vargas would get $250,000 each for 160, 170, 180, 190, 200 and 210 innings pitched. The contract also includes a $250,000 assignment bonus if he's traded.

The agreement was first reported by FanRag Sports, and the contract terms were first reported by MLB.com.

___

More AP baseball: https://apnews.com/tag/MLBbaseball