The New York Mets and starting pitcher Jason Vargas have reached agreement on a two-year, $16 million deal.

The deal, which is pending a physical, includes a club option for 2020, an MLB source told ESPN's Jerry Crasnick.

The agreement was first reported by FanRag Sports, and the length of the contract was first reported by MLB.com.

A soft-tossing lefty, Vargas matched Cleveland's Corey Kluber and Carlos Carrasco and the Dodgers' Clayton Kershaw for most wins in the majors last season with 18 for the Kansas City Royals.

He underwent Tommy John surgery in 2015 and made only three starts in 2016, before becoming the first Royals pitcher to win 18 games since Kevin Appier in 1993.

Vargas, 35, who was an American League All-Star selection, went 2-7 with an 8.13 ERA in 11 starts from July 5 to Sept. 5. But he won four of his last five starts to finish 18-11 with a 4.16 ERA and 134 strikeouts.

Vargas, who also missed the 2008 season with a torn labrum in his hip, is 85-81 with a 4.17 ERA in parts of 11 seasons spent with the Marlins, Mets, Mariners, Angels and Royals. His previous best season came five years ago, when he went 14-11 with a 3.85 ERA in 33 starts for Seattle.