BALTIMORE (AP) — The Baltimore Orioles acquired catcher James McCann and $19 million from the New York Mets on Wednesday night for a player to be named.

McCann was an All-Star in 2019 for the Chicago White Sox, but hit just .195 with three home runs and 18 RBIs for the Mets last season. He joins a Baltimore team that already has perhaps the top young catcher in the game in Adley Rutschman, but the 32-year-old McCann could be a capable backup and fill the type of role veteran Robinson Chirinos did last season.

McCann is due $12 million in each of the next two seasons as part of the $40.6 million, four-year contract he signed with New York in December 2020. As part of the trade, the Mets agreed to pay the Orioles $11 million in 2023 and $8 million in 2024.

He became expendable when the Mets agreed last week to a $15 million, two-year deal with free-agent catcher Omar Narváez that was announced Thursday. Narváez, who turns 31 in February, gets an $8 million salary next year and has a $7 million player option for 2024.

New York also has defensive standout Tomás Nido and touted prospect Francisco Álvarez behind the plate, and like McCann they both bat right-handed. Narváez provides a left-handed stick.

“We are excited to bring Omar to New York,” Mets general manager Billy Eppler said in a news release. “Omar has contact ability and solid approach at the plate, and his left-handed bat fits our roster well. Additionally, the defensive skill and experience he brings behind the plate will be great additions for the Mets and our pitching staff.”

McCann struggled at the plate with the Mets, hitting .220 with 13 home runs, 64 RBIs and a .610 OPS in 182 games over two seasons with the team. By the time New York entered the playoffs last season, he had lost his starting job to Nido.

Narváez was an All-Star in 2021 with Milwaukee before batting just .206 with four homers and 23 RBIs in 84 games last season. He spent the past three years with the Brewers and also has played for the Chicago White Sox and Seattle Mariners. He is a .258 career hitter with 51 home runs and a .728 OPS in seven major league seasons.