Orioles center fielder Adam Jones rounds the bases after his three-run homer in the first inning. He had five RBI in the game. (Robert Stanton/USA TODAY SPORTS)

Coming off a heartbreaking walk-off loss in the opening game of their 10-game West Coast road trip on Friday night, the Baltimore Orioles’ resilience was tested Saturday night against an Oakland Athletics team owning the best record in baseball.

And the Orioles rebounded quickly on Saturday, roughing up former teammates Jason Hammel in an 8-4 win over the A’s in front of an announced sellout crowd of 36,067 at O.co Coliseum.

Orioles center fielder Adam Jones sparked the Orioles by driving in five runs — tying his career high — including a three-run homer off Hammel just three batters into the game.

The Orioles’ best offensive output in their past six games was propelled by the top of the order. Leadoff hitter Nick Markakis had four hits, and the top three batters — Markakis, Steve Pearce and Jones — were 9 for 13 with three extra-base hits (one homer and two doubles) and six runs scored.

The Orioles also hit three homers against Oakland pitching, including Chris Davis’s solo blast in the ninth off former Orioles reliever Jim Johnson, his 16th of the season. Their three homers gave the Orioles 119 for the season, passing Toronto (117) for the most in baseball.

With the win, the Orioles (53-43) have won four of five games following a walk-off loss this season.

They also kept their AL East rivals at bay, maintaining a four-game division lead over Toronto and New York, which both won Saturday.

In the Orioles’ first game coming out of the break on Friday, the Orioles took a two-run lead into the bottom of the ninth, only to see the game end with a loss following Josh Donaldson’s walk-off three-run homer off closer Zach Britton.

Britton had an opportunity for redemption Saturday. Entering the game with two on and two outs in the ninth, Britton converted his 16th save in 19 chance by striking out Nick Punto to end the game.

The Orioles jumped on Hammel early. They chased Hammel — acquired by Oakland from the Chicago Cubs in a bold rotation-boosting trade on July 5 — three batters into the third inning, spoiling his first home start with his new team.

Friday: O’s lose on walk-off

Britton hadn’t allowed a run over his previous 10 outings heading into the ninth inning of Friday night’s series opener at Oakland, converting six straight save opportunities along the way.

Britton had slid into the role of closer nicely in the first half of the season, but in his first appearance since the all-star break, a save opportunity turned into a disaster in just six pitches.

He was unable to preserve a two-run ninth inning lead as the Orioles suffered a frustrating, 5-4 loss after Donaldson’s walk-off, three-run homer in the bottom of the ninth before an announced 27,232 at O.co Coliseum.

“It was frustrating not being able to get that last out, but it’s tough,” Orioles Manager Buck Showalter said. “It happens. They’re a good team. We’ve done it to other people before.”

It was a horrible way to open a three-city, 10-game road trip to the West Coast. The Orioles were just three outs away from beginning their season’s second half with a win against an Athletics team with the best record in baseball.

“We hope they’re a team we’re facing later on in the season,” Britton said of Oakland. “They’re a quality baseball team. They scrap for runs. We did a good job today coming off the break scoring some runs. [Starter Chris] Tillman did a great job on the mound. Just wasn’t able to wrap it up at the end, unfortunately, but we’ll get them tomorrow.”

Some five weeks after a bat-throwing incident at Camden Yards, Oakland fans showed they had been waiting for Manny Machado. They welcomed the third baseman with loud boos at every opportunity, but Machado nearly wrote his own perfect script with a two-run homer in the seventh to give the Orioles a 4-2 lead.

But it wouldn’t be that easy. Even though Britton didn’t record an out in the decisive ninth inning, the A’s didn’t bash him. Yoenis Cespedes opened the inning with an infield single on a swinging bunt to third that Machado had no play on. Brandon Moss then looped a broken-bat single down the line in shallow right field.

Sitting on a first-pitch fastball, Donaldson crushed a 94-mph sinker, sending it over the center-field fence, prompting a celebration at home plate.

“Sinker, it’s my best pitch,” Britton said. “I’m one quality sinker away from getting a double-play ball and getting us closer to that win. He put a good swing on a good pitch.”

— Baltimore Sun