NEW YORK — Free agent infielder Jed Lowie and the New York Mets have agreed to a $20 million, two-year contract, a person familiar with the negotiations told The Associated Press.

The person spoke to the AP on condition of anonymity Thursday because the agreement is subject to a successful physical.

Lowrie is a switch-hitter who turns 35 in April and is coming off his first All-Star season. Like new Mets second baseman Robinson Cano, he used to be represented by Brodie Van Wagenen, co-head of CAA Baseball before he became New York's general manager in October. Like Van Wagenen, Lowrie played baseball at Stanford.

While Lowrie played mostly second base for the Oakland Athletics during the past three seasons, he figures to see time at third and first with the Mets, who acquired Cano from Seattle last month.

Lowrie is the fifth All-Star added by the Mets this off-season, following Cano, closer Edwin Diaz, catcher Wilson Ramos and reliever Jeurys Familia, traded to Oakland last summer and then re-signed by New York as a free agent.

A veteran of 11 major league seasons, Lowrie set career highs with 23 homers and 99 RBIs last year and hit .267. He also has played for Boston and Houston, and he has a .262 career big league average with 104 homers and 509 RBIs.

He struck out a career-worst 128 times last year, up from 100 in 2017 and 65 in 2016, when he was limited to 87 games because of a bruised right shin and a bunion on his left foot that needed surgery.

Lowrie completed a contract that paid $28 million over four seasons.

___