"We've still got little more than half a month to go, probably three-quarters of a month actually," Beckett said. "We've got to keep winning. This thing ain't over yet."
Beckett (13-8) struck out seven in 6 2/3 innings, allowing two runs and six hits. He had been 0-2 in three starts since beating Milwaukee on Aug. 23.
"He got me out with fastballs, changeups, curveballs," Washington's Marlon Byrd said. "He was on today. ... That's the Beckett from the World Series a couple of years ago."
Cabrera hit his 30th homer and became the first Marlins player to reach 30 homers and 100 RBI twice. At 22 he is the youngest major-league player to accomplish the feat in consecutive seasons, according to the Elias Sports Bureau. Albert Pujols was a few months older when he did it in 2001-2.
Florida won three straight, outscoring Washington 24-7, after losing the series opener. The Marlins moved within a half-game of Houston, the NL wild-card leader, while Washington dropped four games behind the Astros.
"It takes a while for a team to jell and I think it's starting to come together now. It's really tough when you're losing and not doing well to jell like that," Beckett said.
John Patterson (8-5), pitching despite a sinus infection, gave up seven runs and nine hits in 4 2/3 innings. He had been 6-0 with a 1.79 ERA in 15 starts at RFK Stadium.
"He's a little under the weather, so it wasn't surprising," Nationals manager Frank Robinson said. "He pitched like he could go out there and go as long as he could go. But he wasn't effective."
Washington's bullpen has been taxed this week because of short outings by the starters. Darrell Rasner got just eight outs Tuesday in his major-league debut and John Halama got only two outs Wednesday.
Manager Jack McKeon said the Marlins didn't want to make things easy for Patterson.
"We took him deep into the counts. That was one of our better games for making him pitch," McKeon said. "We're always up there swinging at first pitches and making outs, but we took him deep into the count."
The game drew 27,625 and increased the Nationals' home attendance to a franchise-record 2,333,091 in the team's first season in Washington. The previous mark was set when the Expos drew 2,320,651 to Montreal's Olympic Stadium in 1983.
Florida stole four bases on catcher Brian Schneider, and the first two led to runs.
Luis Castillo led off the game with a single, swiped second and scored on Cabrera's single for a 1-0 lead. Brad Wilkerson's triple and Jose Guillen's sacrifice fly tied the score in the bottom half, but Florida went ahead in the fourth when Damion Easley singled, stole second and scored on Pierre's bloop single to left.
Pierre stole second on a close play, and Patterson showed his frustration by flipping his glove into the air. He drew a rebuke from third base umpire Tim McClelland.
"He saw me flip my glove, and that's how frustrated I am. I was sick, there wasn't anything going right. I shouldn't have done it," Patterson said. "He thought I was showing the umpire up."
Beckett started a five-run fifth by homering in his 180th career at-bat. Cabrera hit an RBI single, Pierre had a two-run single that chased Patterson, and Matt Treanor added a run-scoring single off Travis Hughes for a 7-1 lead.
"I'm not a hitter," Beckett said. "It's cool, but like I said, I'm not here to show anybody up. I'm not a home run hitter now. It's just kind of part of the game."
Washington crept closer in the ninth on pinch-hitter Ryan Zimmerman's RBI grounder and Brandon Watson's run-scoring triple.
- Beckett has pitched a career-high 158 1/3 innings, 2 1/3 innings more than last year.
- Washington's Nick Johnson drew a walk as a pinch-hitter in the seventh. It was his first appearance since leaving a Sept. 3 game after aggravating a right heel injury.