ESPN MLB writer Jerry Crasnick breaks down whether the deal which brings pitcher Andrew Cashner from San Diego to Miami will help the Marlins make the playoffs. (1:43)

The Miami Marlins bolstered their starting rotation with some much-needed reinforcements Friday, acquiring right-handers Andrew Cashner and Colin Rea in a seven-player trade with the San Diego Padres.

The Marlins, eager to shore up their rotation for a playoff push, will also receive pitching prospect Tayron Guerrero and cash considerations for right-handers Jarred Cosart and Carter Capps and two minor leaguers, pitching prospect Luis Castillo and first baseman Josh Naylor.

Cashner is 4-7 this year with a 4.76 ERA in 16 starts, and he has a career record of 30-49 with a 3.73 ERA in seven seasons. The seven-year veteran has pitched well of late, posting a 2.55 ERA with 23 strikeouts in 17 2/3 innings over his last three starts.

Rea, who is in his second major league season, is 5-5 with a 4.98 ERA in 19 games this year.

Cashner has a $7.15 million contract and becomes a free agent after this season. Rea, 26, has a salary of $510,200 and is under team control through 2018.

The Marlins (55-47) are in contention for their first playoff berth since 2003 despite a shaky rotation. Aside from ace Jose Fernandez, their starters are 23-24 with an ERA of 4.40. The Marlins are tied with the St. Louis Cardinals (55-47) for the NL's second wild card and trail the first-place Washington Nationals (60-42) by five games in the NL East.

Miami's rotation was further depleted last week when left-hander Wei-Yin Chen went on the disabled list because of a sprained elbow. Cashner and Rea will join Fernandez, Tom Koehler and Adam Conley.

Cashner, who joined the Padres in 2012 and is the team's longest-tenured current player, said Wednesday that it was "sad" to see constant turnover among his teammates.

"You'd definitely like to see more guys stay here longer in their careers," he said. "That's just kind of how it's been since I've been here. I've made some great relationships with a lot of guys, and there'll be lasting friendships for a lifetime."

Andrew Cashner is heading to the Marlins along with Padres teammate Colin Rea, according to multiple reports. AP Photo/Chris Carlson

The trade is the second between the teams this summer. In June, the Marlins acquired All-Star reliever Fernando Rodney from the Padres for a minor league pitcher.

The prize in Friday's deal for the Padres might be Naylor, 19, a left-handed power hitter taken by the Marlins in the first round of the 2015 draft. He is batting .269 with nine home runs this year for Single-A Greensboro.

Cosart went 13-11 in 2014 with Houston and Miami but has struggled since. This year he's 0-1 with a 5.95 ERA in four starts with the Marlins, and 3-4 with a 4.09 ERA in 10 starts for Triple-A New Orleans.

Capps, a hard-throwing reliever, underwent Tommy John surgery in March and is expected to be ready for opening day 2017.

The deal marks the second high-profile trade this week involving the rebuilding Padres, who sent outfielder Melvin Upton Jr. to the Toronto Blue Jays on Tuesday.

The Padres (44-58), who enter Friday with the NL's fourth-worst record, have also traded away starters James Shields and Drew Pomeranz this season.

The Associated Press contributed to this report.