SAN FRANCISCO (AP) — Outfielder Michael Conforto has agreed to a $36 million, two-year contract with the San Francisco Giants, a deal that includes an opt out after the first season, a person with direct knowledge of the pact said Friday.

The person spoke to The Associated Press on condition of anonymity because the contract is pending a successful physical. Conforto missed all of last season following right shoulder surgery.

The Giants lost out on shortstop Carlos Correa earlier in the week when a concern with his surgically repaired right ankle arose during the medical evaluation process. Correa’s $350 million, 13-year deal fell through, and he agreed instead with the New York Mets on a $315 million, 12-year contract.

San Francisco went 81-81 this year and missed the playoffs after winning a franchise-record 107 games and the NL West in 2021.

The Giants should have a talented, experienced outfield in 2023. Mitch Haniger agreed to a $43.5 million, three-year contract this month, and versatile Mike Yastrzemski returns.

Conforto had surgery performed in April by Dr. Neal ElAttrache. The 29-year-old Conforto spent his first 6 1/2 major league seasons with the New York Mets before becoming a free agent after the 2021 season. He turned down an $18.4 million qualifying offer from the Mets in November last year.

Agent Scott Boras said Conforto got hurt while training in January 2022 during Major League Baseball’s labor lockout, which ended in March.

___

AP Baseball Writer Ronald Blum contributed to this report.

___

AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports