BALTIMORE -- The Baltimore Orioles and Washington Nationals are hoping their spirited two-game series was just a precursor for a few more high-stakes meetings in October.

Steve Pearce homered and Wei-Yin Chen picked up his team-leading ninth win as the Orioles topped the Nationals 4-3 on Thursday night.

With the victory, the Orioles gained a split of their two-game home series with the Nationals. Baltimore also won Monday night in Washington, but the second game was rained out and will be made up Aug. 4.

Both teams have World Series aspirations and the quality of play didn't diminish those hopes.

"Two good teams playing good baseball," Orioles manager Buck Showalter said. "Games are starting to dwindle now. It's not necessarily the way you play, it's just a little different feel to the games as you get past the All-Star break and you grind like heck to put yourself in position to play meaningful games.

"Starts about the middle of August, but they count the same in April. We all know that."

The Orioles have won eight of their past 10 games and lead the American League East by three games. The Nationals fell into a first-place tie with Atlanta in the National League East.

Pearce, the Orioles' left fielder, went 2-for-4 with two runs scored and hit his 11th home run of the season.

Chen (9-3) allowed four runs and eight hits with six strikeouts in 5 2/3 innings for Baltimore (50-41). Right-hander Zach Britton posted his 15th save and has not allowed a run in 30 1/3 innings at Camden Yards.

"I am happy because this is the first time during my career, including my career in Japan, the first time before the All-Star break that I can get that many wins," Chen said. "I think the reason I can get that many wins is because of my teammates really picked me up during the first half of the season.

"Our lineup, our bullpen, my catcher, all of the teammate are playing really well behind me, so that's the reason I could win this many games."

Washington left-hander Gio Gonzalez (6-5) had his four-game winning streak snapped. He gave up four runs (three earned) and six hits with seven strikeouts and three walks in 6 2/3 innings. His streak of 22 scoreless innings also came to an end.

"I felt fine," Gonzalez said. "I was going out there to try and attack the strike zone. It's a tough lineup going against these guys, especially all the way down to the last guy. It's definitely a battle trying to mix it up."

Nationals catcher Wilson Ramos extended his hitting streak to a career-high 13 games, currently the longest in the majors. Right fielder Jayson Werth homered for the second consecutive night and has 10 this season. Designated hitter Ryan Zimmerman had two hits and an RBI for Washington (49-41).

Trailing 4-1 in the sixth inning, the Nationals scored twice to close the gap. Werth led off with a home run to center. Zimmerman then doubled two batters later and scored on another two-bagger by shortstop Ian Desmond that ended Chen's night.

However, Tommy Hunter, Darren O'Day and Britton kept Washington scoreless the rest of the way.

"That's a high quality lineup. You can stack that up with anybody in the NL or AL," O'Day said. "Lot of good hitters, a lot of talent. It's tough sledding to get through there. You've kind of got to pick your guys to pitch to."

The Orioles improved to 42-22 when they homer. The Nationals fell to 9-38 when scoring three or fewer runs.

Pearce gave the Orioles a 1-0 lead in the first with a towering homer to left. That ended a 22-inning scoreless streak by Gonzalez, the longest by any Nationals pitcher this season. It was also Pearce's 17th multi-hit game of the season.

Meanwhile, Chen retired the first seven batters he faced before allowing a one-out single to catcher Wilson Ramos in the third.

Baltimore extended the lead to 4-0 in the bottom of the third. Right fielder Nick Markakis walked and Pearce singled with two outs. Center fielder Adam Jones followed with an RBI double and designated hitter Nelson Cruz knocked in another run with an infield hit. Desmond made an errant throw to third on Cruz's ball, allowing the fourth run to score.

The error was Washington's first in 13 games, ending the longest streak in the majors this season. Desmond left in the eighth with a sore thumb after getting hit by O'Day, but X-rays were negative.

"I feel like I had a play at third," Desmond said. "It's just one of those instinct plays. I think if you watch the games, I've made that play before. That one just got away from me."

Washington pulled to within 4-1 in the fourth, helped by a 58-second replay challenge by manager Matt Williams that showed a pitch by Chen hit the jersey of first baseman Adam LaRoche. That put runners on first and second for Zimmerman, who responded with an RBI single up the middle.

"You just keep battling," Williams said. "They got a good club and took advantage of a mistake. We battled back ... just not enough tonight."