NEW YORK — Danny Espinosa and the New York Mets have agreed to a minor league contract with an invitation to spring training.

The veteran switch-hitter gives the Mets even more depth in a crowded infield. He could be a backup option at shortstop behind Amed Rosario.

Espinosa spent last season in Triple-A with three organizations: the Blue Jays, Dodgers and Phillies. He was released by Philadelphia in August.

The 31-year-old is a .221 career hitter with 98 homers and 316 RBIs in 872 major league games over eight seasons with the Nationals, Angels, Mariners and Rays. He has mostly played second base but was Washington's everyday shortstop in 2016, when he batted .209 with a career-high 24 home runs and 72 RBIs.

Espinosa has also played third base, first base and left field in the big leagues.

The Mets announced the deal Friday.

___

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP_Sports