The Marlins have acquired right-handers Andrew Cashner, Colin Rea and Tayron Guerrero and cash considerations from the Padres in exchange for reliever Carter Capps, starter Jarred Cosart, first base prospect Josh Naylor and right-hander Luis Castillo, in a deal first reported by Buster Olney of ESPN.com. We reported last night that Miami was getting closer to a deal for Cashner.

The 7-player deal is a significant one for both clubs, as the Marlins receive much needed rotation depth in an effort to contend this year while the Padres continue their summer sale. Today’s swap is the second trade between these teams in the last month, as San Diego shipped Fernando Rodney to Miami for pitching prospect Chris Paddack at the end of June.

The Marlins have shown interest in virtually every available starter this summer, but appear to be done shopping with the additions of Cashner and Rea. The pair of righties will slot in behind Jose Fernandez, Adam Conley, Tom Koehler in the team’s rotation for the stretch run, with Jose Urena also in the mix as a depth piece

Miami is currently without Wei-Yin Chen (elbow sprain) and is expected to limit Fernandez’s innings down the stretch, so the addition of two arms makes sense. The Marlins currently sit just five games back of the Nationals in the NL East, and are tied with the Cardinals for the second Wild Card spot in the National League.

Cashner, 29, has posted a 4-7 record and 4.76 ERA in 16 starts with San Diego this season, and has looked solid in his last three starts against the Giants, Cardinals and Blue Jays. He drew strong interest from the Jays, Orioles, Rangers and Giants before being moved to Miami, as one of the best rental options available on this year’s market.

Cashner’s career struggles have partially been explained by recurring injury issues, and the amount of teams hoping to acquire him as a change-of-scenery candidate speaks to how he is valued throughout the league.

Rea, 26, is 5-5 with a 4.98 ERA in 19 appearances (18 starts) for the Padres so far this year. He is under control through the 2021 season, meaning that the deal gives Miami both a short- and long-term addition in the rotation mix. Heading into the season, Baseball America ranked Rea as the 7th-best prospect in San Diego’s system.

Guerrero, 25, made his major-league debut for San Diego in May and has posted a 5.30 ERA in 35.2 relief innings split between Double-A San Antonio and Triple-A El Paso. He was not ranked among MLB.com’s top 30 Padres prospects at the time of the deal, and appears to be a bullpen depth option for Miami going forward.

San Diego has now dealt Rodney, Cashner, Rea, Drew Pomeranz, James Shields and Melvin Upton Jr. since the beginning of the season, re-stocking its farm system after an aggressive series of trades before the 2015 season failed to produce on-field results. The quartet of additions from the Marlins are all controllable for the foreseeable future, and are all regarded as high-ceiling pickups.

Capps, 25, is out for the entire season due to Tommy John surgery after establishing himself as a top reliever last season. Capps, armed with an unorthodox delivery, posted a stellar 1.16 ERA in 31 innings for Miami last season and is a long-term late-inning relief option for the Padres in the future. Capps is under team control through the 2018 season, giving San Diego two full years of control after this season.

Cosart, 26, has now been traded three times in five years and will likely get a chance to pitch out of the rotation for the Padres in place of Cashner and Rea. Cosart has spent most of the season at Triple-A New Orleans, but has made four starts for Miami and owns a 5.95 ERA in 19.2 innings.

Cosart has shown flashes of brilliance throughout his career (1.95 ERA in 10 starts with Houston in 2013), but has not lived up to his billing as a top prospect on a consistent basis in the majors. He is controlled through 2019, giving the Padres a rotation option during their rebuilding process.

Naylor, 19, is a 6-foot, 225 lb. first baseman who was selected with the 12th overall pick in last year’s draft. Recently ranked by Baseball America as the 100th-best prospect in baseball, Naylor is regarded for his raw power and hitting ability but is thought of as a below-average athlete and defender at first base.

Miami was said to be hesitant to discuss Naylor in talks about Cashner, though the inclusion of Rea, a long-term asset, seems to have changed the team’s stance. The inclusion of Naylor is yet another example of the strong market for sellers this summer, as Naylor is the fourth prospect ranked in BA’s midseason top 100 to be dealt so far this month.

Castillo, 23, owns a 7-3 record and 2.25 ERA in 20 appearances (18 starts) with High-A Jupiter this season and has seen his prospect stock rise as a result. He was ranked as the 6th-best prospect in Miami’s system in MLB.com’s latest rankings, and is a power arm who has recently transitioned to a starting role.

Barry Jackson of the Miami Herald, Ken Rosenthal of FOXSports.com, Jeff Passan of Yahoo Sports and Jayson Stark of ESPN.com each reported the inclusion of pieces in the deal.