Ryan Zimmerman strolls back to the Nats dugout holding a piece of what used to be his bat in the seventh inning at Citi Field. (Mike Stobe/Getty Images)

A few hours after the non-waiver trade deadline passed, the race for the National League East accelerated. Deadline-week deals by both contestants fired the starter’s gun, as the Washington Nationals and New York Mets signaled their commitment by adding the pieces each team felt were needed to last into October.

The Nationals bolstered their bullpen. The Mets fortified their roster. Their choices made immediate impact over 12 thrilling innings, which ended with a 2-1 Mets win — a victory that pulled them within two games of the Nationals atop the division.

The man the Mets nearly traded days earlier, second baseman Wilmer Flores, ended things Friday night. Flores, who received standing ovations for every tiny success from sympathetic Mets fans after a near-deal left him on the field in tears earlier this week, hit a walk-off home run off Felipe Rivero in the bottom of the 12th. Deadline drama, stranger than fiction.

Rivero was in his third inning of work at the time, though Casey Janssen, Drew Storen and Jonathan Papelbon, the Nationals’ deadline acquisition, had not yet pitched. Nationals Manager Matt Williams said two relievers were unavailable, but he would not specify who.

“I think it’s pretty obvious,” he said.

Splitsville: Mets pitcher Hansel Robles does the splits before nailing Jayson Werth at first base in the 11th inning. (Julie Jacobson/Associated Press)

Papelbon warmed at one point, likely in the case the Nationals got a lead. Storen had pitched two days in a row, and Williams does not like to push relievers to three. Janssen was not reported injured but was not scheduled to pitch Friday. So Rivero pressed on, his pitch count reasonable, with Matt Thornton warming.

“Scouting report says that he can’t hit fastball inside, so [I threw] him two,” said the lefty, 24, who had pitched two scoreless innings before that. “I threw the first, then I threw the second one. He was ready for that one.”

By the time Flores hit that one, Dan Uggla was playing first base and Ryan Zimmerman left field. Bullpens were burned and the benches nearly exhausted by a back-and-forth game that carried an edgier energy on the field and in the stands than most the Nationals have played this season — not quite like October, but nothing like April or May, either.

“Their fans are gonna show up. They’re excited about their team this year,” Nationals right fielder Bryce Harper said. “We’re still in first place, doing our thing.”

Harper plays with added ferocity most days, and on Friday it got the best of him in the 11th. Home plate umpire Jerry Meals called Harper out on a pitch later shown to be outside on pitch trackers. Harper got in Meals’s face, hollering his case. Meals gave him time to compose himself. He did not, and Meals ejected him.

“He needs to stay in the baseball game,” Williams said. He repeated that multiple times.

“I’m sticking up for my team and myself at the same time,” Harper said. “He was bad all night.”

Harper’s departure left the Nationals short-handed, because Clint Robinson and Tyler Moore had already pinch-hit, and Danny Espinosa had already pinch-run. Ultimately, the game was decided in the bullpen, where one of the Mets’ deadline acquisitions, former National Tyler Clippard, featured prominently.

Clippard was warming in the Mets’ bullpen as starter Matt Harvey’s pitch count rose in the eighth inning. With two men on and two men out, the Mets held a one-run lead and decided to stick with Harvey to preserve it. If they hadn’t, Clippard would have faced the man he was traded from Washington for, Nationals third baseman Yunel Escobar. Instead, Harvey faced him. Escobar singled to tie the game.

Then Mets Manager Terry Collins called on Clippard to get Nationals right fielder Jayson Werth, a batter later. After a 13-pitch battle between the four-year teammates, Clippard struck Werth out looking to keep the score tied. The Nationals did not get another hit.

In addition to Clippard, the Mets added Juan Uribe and Kelly Johnson last week and outfielder Yoenis Cespedes just before Friday’s deadline. Friday night, the star the Mets already had, the one who anchors the rotation that has kept them close all year, carried them most of the way. Harvey dominated the Nationals for seven innings before hitting a run’s worth of trouble in that eighth.He pitched perfectly for 5 1/3 innings, threatening a no-hitter with well-spotted power. Jose Lobaton got the Nationals’ first hit in the sixth.

By then, the Nationals trailed because a bout of wildness consumed Nationals starter Gio Gonzalez, the kind he has been able to fend off through five straight starts allowing two earned runs or fewer.

Gonzalez walked three batters in the fourth, allowing just one run despite his handcrafted quagmire. He struggled again in the fifth. He left after 42/3 innings and 105 pitches, struck out six but walked four, both unfavorable ratios that cost him a chance for a third straight win. He said later he was flying open and couldn’t adjust, that he “put his team in a tough situation.”

His bullpen, Tanner Roark, Aaron Barrett, then Rivero bailed him out with 71/3 scoreless innings heading into that 12th. With relievers unavailable, the Nationals could not use their best. With regulars back and the bench exhausted, the Nationals could not score the run that would have brought Papelbon to the mound.

The game wore on. The race, closer now than when Friday began in more ways than one, looks like it may wear on, too.