A.J. Cole is headed to the Bronx following a Monday night trade. (John Bazemore/AP)

SAN FRANCISCO — The Washington Nationals announced Monday night that they have traded right-hander A.J. Cole to the New York Yankees for cash considerations, officially ending Cole’s second stint with the organization after he was designated for assignment on Friday.

A former premier pitching prospect, the 26-year-old Cole made his major league debut with the Nationals in 2015. He allowed nine runs in two innings in his first appearance, but didn’t make an Opening Day roster until this season. He broke camp in March as the team’s fifth starter and allowed 10 runs across 3 1/3 innings against in his first start. He rebounded in his second, limiting the Braves to two runs in 5 1/3 innings, but that wasn’t enough to stop the club from moving him to the bullpen to make room in the rotation for Jeremy Hellickson last week.

Cole gave up at least one run in each of his two relief appearances. Last Wednesday, he was charged with a run in a third of an inning but allowed a grand slam to Yoenis Cespedes after entering the game with the bases loaded. The outing inflated his ERA to 13.06. Two days later, he was designated for assignment and right-hander Carlos Torres was called up. The Nationals were forced to designate him — running the risk of exposing him on the waiver wire if they didn’t trade him within seven days — because he didn’t have any minor league options remaining.

It’s the second time Washington has traded Cole. After the Nationals selected him in the fourth round of the 2010 draft, they included him in a four-player package in a deal with the Oakland Athletics for Gio Gonzalez and a minor leaguer in December 2011. He returned to the franchise as part of a three-team trade that sent him, Blake Treinen, and Ian Krol to the Nationals.

Barring another return to the organization, Cole completed his Nationals career with a 5.32 ERA in 110 innings across 26 games, including 19 starts.

Read more on the Nationals:

Don’t get too worried about the Nats, but don’t ignore problems, either

Trea Turner and Michael A. Taylor get green light on base paths

Can the Nationals finish this road trip over .500?