The San Diego Padres and right-hander Seth Lugo are finalizing a two-year contract, a source confirmed to ESPN's Jeff Passan on Monday.

The deal is worth about $15 million, with an opt-out after 2023, according to The Athletic.

Lugo, 33, pitched primarily out of the New York Mets' bullpen over the last seven years but had been drawing interest as a potential starting pitcher on the free-agent market and might fit into the Padres' rotation next season.