ATLANTA -- A month after adding Chris Archer and Keone Kela before the July 31 non-waiver Trade Deadline, the Pirates dealt away two veteran infielders to postseason contenders.

In a pair of moves announced shortly after midnight, the Pirates traded David Freese to the Dodgers for Minor League infielder Jesus Manuel Valdez and sent shortstop Adeiny Hechavarria and cash to the Yankees for a player to be named later or cash. Since the deals were completed before Sept. 1, Freese and Hechavarria will be eligible for the postseason with their new clubs.

The Bucs fell out of the postseason race as they lost 17 of their 27 games in August. After beating the Braves on Friday night, the Pirates stood 13 1/2 games behind the National League Central-leading Cubs and 9 1/2 games out of an NL Wild Card spot. Their late trades on Friday were a clear indication that they will spend the next month looking toward 2019, and neither Freese nor Hechavarria were likely to be a part of that team.

"We made the difficult decision to trade David to give him an opportunity to pursue a World Series championship this season," Pirates general manager Neal Huntington said in a statement. "We truly appreciate all that David has contributed to the Pirates these three seasons and wish him well.

"This move will free up valuable playing time for some of our younger players, while clearing some salary. We are also pleased to add a player with interesting power, athleticism and defensive versatility to our system in Valdez."

Freese was a valuable veteran leader in a young Pirates clubhouse, and he was quietly in the middle of his best offensive season since his All-Star campaign in 2012. Freese hit .282/.336/.444 with nine homers and 42 RBIs in 94 games this year, serving as a complement and mentor to rookie third baseman Colin Moran . Now, the '11 World Series Most Valuable Player might get another shot at October glory.

The Pirates saved about $680,000 by trading Freese, whose contract also included a $6 million club option or $500,000 buyout for next season. It is unknown how much cash Pittsburgh sent the Yankees along with Hechavarria or how much of that will be offset by what they receive in return. It's still possible one or both could return in the offseason, as Freese would provide stability at the corners and Hechavarria's glove would be an asset in the infield.

Valdez, 20, was hitting .230/.343/.412 with six homers and 16 steals in 60 games for the Dodgers' Dominican Summer League affiliate.

The Pirates acquired Hechavarria, a slick-fielding but light-hitting shortstop, in a trade with the Rays on Aug. 6. He will be a free agent at the end of the season, so by moving him -- and designating infielder Sean Rodriguez for assignment earlier this week -- the Pirates cleared playing time for rookie shortstop Kevin Newman , infielder Adam Frazier and, potentially, infield prospect Kevin Kramer along with veterans Jordy Mercer and Josh Harrison.

Those moves also cleared three spots on the Pirates' 40-man roster. The Bucs could fill some of them with September callups, perhaps including Rule 5 Draft pick Nick Burdi, super-utility man Pablo Reyes and Kramer. They'll need more 40-man flexibility in the offseason, when they must protect a fairly large class of prospects -- including the Pirates' No. 1 prospect, according to MLB Pipeline, Mitch Keller and Cole Tucker (No. 5) -- from the Rule 5 Draft.

Adam Berry has covered the Pirates for MLB.com since 2015. Follow him on Twitter and Facebook and read his blog.