Right-hander Miguel Castro, a tantalizing but at-times inconsistent piece of the Orioles’ bullpen, joined this season’s list of departures from the pitching staff when he was dealt just ahead of Monday’s trade deadline to the New York Mets.

The Orioles acquired minor league left-hander Kevin Smith and a player to be named or cash considerations in exchange, the team announced.

“Miggy is a huge loss for us,” manager Brandon Hyde said after the team’s 4-3, 11-inning win over the Toronto Blue Jays. “I’m a big Miguel Castro fan as a person as well. Love the guy. He’s been improving since I’ve seen him pitch, and put together a nice year this year. Tough to say goodbye to him after the game.”

Castro has been a fixture in the bullpen ever since the Orioles acquired him early in the 2017 season from the Colorado Rockies. In parts of four seasons with the Orioles, Castro had a 4.06 ERA with electric stuff, though he struggled to get results on a regular basis with it.

This year, the Orioles simplified his delivery to have him work primarily from the stretch. He started the season well, but since fell off. He’ll join the Mets on Tuesday at Camden Yards, where they begin a two-game series against the Orioles that could have Castro make his debut against his former team the same way Richard Bleier did with the Miami Marlins in early August.

Castro, via the Orioles’ director of Latin American operations Ramón Alarcón, said he was surprised by the trade and hadn’t been expecting to move, but was grateful for his time with the Orioles.

“I’ll miss my teammates,” Castro said. “I’ll miss my coaches. I spent four great seasons here. I’ll miss everything about it. It’s going to be weird tomorrow, for sure. But I’m definitely going to miss everybody here. I’ve been fortunate to have great teammates, great coaches, and they showed love to me and I show love back to them.”

Smith, a seventh-round draft pick in 2018 by the Mets out of Georgia, recorded a 3.45 ERA in 117 innings with 130 strikeouts and a 1.26 WHIP between High-A St. Lucie and Double-A Binghamton in 2019. He was in the Mets’ player pool at their alternate training site in Binghamton, New York, this summer, and began the season as their No. 9 prospect, according to Baseball America.

The deal with the Mets makes three trades for the Orioles in the past two days leading up to the deadline, and five so far this season.

Earlier in the season, the Orioles traded nonroster right-hander Hector Velázquez to the Houston Astros and Bleier to the Marlins, each for a player to be named.

They got two players to be named Sunday in a deal for left-hander Tommy Milone with the Atlanta Braves, and a third plus infielders Tyler Nevin and Tarrin Vavra from the Rockies in exchange for reliever Mychal Givens.

Like the Bleier trade, it was consummated during an Orioles game, meaning Castro couldn’t be used and had to wait to find out until after. Hyde said before Monday’s series finale in Buffalo, New York, that Castro hadn’t pitched in recent days because of sinus issues, but that he was “on hold” from using him Monday anyway.

“I was going to play without him, and then I got the initial word that I wasn’t going to be able to use him, obviously,” Hyde said. “Then, I didn’t see him at all until coming in the clubhouse after the game. He just thanked me for everything, I gave a little social distance hug and we’ll see him tomorrow.”