Seeking to improve their offense, the Mets acquired Yoenis Cespedes from the Tigers on Friday in exchange for two minor league pitching prospects. Cespedes has a .293 average, .829 on-base-plus-slugging-percentage and 18 home runs. (Gail Burton/Associated Press)

The non-waiver trade deadline has passed, and the calendar is turning to August, when struggling teams are looking toward the future and contenders have tweaked their rosters with October dreams in mind. The Miami Marlins, Philadelphia Phillies and Atlanta Braves sold off several parts this week, leaving two standing in the National League East: the Washington Nationals and New York Mets.

The Nationals, who have stayed in first place despite injuries and inconsistent play, traded for six-time all-star closer Jonathan Papelbon to fortify their bullpen and also welcomed back Anthony Rendon, Jayson Werth and Ryan Zimmerman from injuries. Sensing an opening as they trailed the Nationals by only three games entering this weekend’s key series, the Mets added players at the trade deadline for the first time in eight years, capped by Friday’s splashy addition of slugger Yoenis Cespedes.

“We believe we’re in position to compete through the rest of the season for a playoff spot,” Mets General Manager Sandy Alderson said. “And we’re going to do everything we can to ensure that competitive level.”

Last week, the Mets traded for complementary pieces Kelly Johnson and Juan Uribe to help a struggling offense. They also acquired Oakland closer Tyler Clippard, a longtime National, to bolster a solid bullpen. But as the clock ticked down on Friday’s 4 p.m. trade deadline, the Mets sent the biggest signal they are serious by dealing two prospects from their deep crop of minor league pitching — right-handers Michael Fulmer and Luis Cessa — to Detroit for Cespedes, who could be a free agent in two months.

“They’ve improved their club,” Nationals Manager Matt Williams said. “They’ve filled needs they felt were missing for them. We know Clip very well. He’s a quality pitcher. Don’t know Cespedes that much because he’s been in the American League, but the stats speak for themselves. He’s a powerful guy that plays the outfield very well. He knows how to drive runs in and hit some homers. They’ve added some good pieces. We’re going to have to play well to beat them.”

Puppeteer Ingrid Crepeau is the costume designer behind the eye-catching mascot outfits for the Washington Nationals' racing presidents. She takes us behind-the-scenes into her studio where she turns the presidents into "Star Wars" characters. (Erin Patrick O'Connor/The Washington Post)

The shifting of players within the division — Johnson and Uribe from the Braves, Papelbon from the Phillies and Clippard after only 3 1/2 months in Oakland — creates an unusual dynamic. Adding Papelbon awkwardly pushed Drew Storen, in the midst of a strong season, out of the closer’s role but undoubtedly made the Nationals better. Clippard said facing his old team would be “weird” — as he did in Friday’s 2-1 Mets victory — but he was excited to be part of a pennant race. When he joined the Mets earlier this week, he said the Nationals could be caught.

“Every team in the big leagues is beatable,” Clippard said before Friday’s game. “That was just stating facts, not throwing an arrow over there or anything. This team is good. We’ve got an unbelievable pitching staff over here. Obviously the Nats are good, and they’re going to be a tough team to beat. We all know that. I think this series is going to be a very important one.”

The main reasons the Mets couldn’t be taken as seriously in the division race was their offense and the team’s payroll. Mets ownership consistently limited salary — $106 million this year is the 18th largest in baseball — while being in the largest market in the country. Despite objections by the Mets that it was for medical reasons, money was a reason the team didn’t complete a Wednesday trade for outfielder Carlos Gomez, according to the Milwaukee Journal-Sentinel.

But two days later, and after dealing with criticism about their commitment to improve, the Mets landed Cespedes.

“Cespedes is a great offensive player,” Nationals General Manager Mike Rizzo said. “We respect the Mets. They have a good team. They just got better by acquiring Cespedes. . . . Everyone is trying to improve. It’s a competitive division. We respect all the teams in here. It’s going to be a good race the rest of the way.”

Cespedes, with his .293 average, .829 on-base-plus-slugging-percentage and 18 homers, won’t be the single Band-Aid for the Mets’ offense. But if his addition — combined with the others — results in just a few more runs, the Mets could wind up with a few more wins. New York is powered by its rotation of Matt Harvey, Noah Syndergaard, Jacob deGrom, Jon Niese and Bartolo Colon.

Entering Friday’s game, the Mets’ offense was tied for the second worst in baseball. They are averaging 3.56 runs per game, better only than the lowly Phillies at 3.54 per game. The only qualified hitters on the Mets’ roster who are league average or better (based on an adjusted version of OPS) are Lucas Duda, Curtis Granderson and, barely, Daniel Murphy.

Cespedes, who will be activated for Saturday’s game, will make it four.

“We’ve got to make up some ground here so we can stay in the hunt,” Mets Manager Terry Collins said before Friday’s game. “[This series is] bigger than the first three times.”