BALTIMORE (AP) — Playing at home for the first time since the All-Star break, the Baltimore Orioles honored a part of their past and pulled out a victory they hope will influence their immediate future.

Matt Wieters homered leading off the 11th inning, and the Orioles beat the Atlanta Braves 2-1 Monday on the night Nick Markakis returned to Baltimore.

After taking two from Tampa Bay over the weekend, the Orioles rallied in the ninth inning and put the game away in the 11th when Wieters connected on the second pitch from Luis Avilan (2-4).

It was Wieters’ fourth home run, the first since June 25, and his teammates celebrated by dousing him with a bucket of water at the plate.

Brad Brach (4-2) worked the 11th for the Orioles, who climbed back to .500 (49-49).

“To win the last three games, it’s been a challenge for us, so I think it’s coming at a good time,” manager Buck Showalter said.

The defending AL East champions trail division leader New York by seven games but are in the thick of the wild-card hunt.

“Right now being where we are, cherishing a win is big,” Wieters said. “To be able to keep piling up wins is what we need to do.”

Markakis played nine years with the Orioles before signing a four-year, $44 million contract with Atlanta during the offseason. Many in the crowd of 26,256 acknowledged his run with the Orioles with a lengthy standing ovation before he stepped into the batter’s box to begin the game.

The team also saluted their former right fielder with a video montage before the bottom of the first.

“Tonight just shows what type of fans they are and how loyal they are,” Markakis said.

His former teammates feel the same way

“Obviously we all love him and respect him,” Orioles starter Kevin Gausman said. “Just one of those guys that did everything the right way.”

Markakis went 2 for 5. Rookie Adonis Garcia homered for the Braves, who have dropped 11 of 15.

Atlanta starter Alex Wood allowed three hits and two walks in 7 1-3 innings. The right-hander was replaced by Jason Frasor, who struck out Manny Machado on a 3-2 pitch with two on and two outs.

“It’s one of those things where, if you throw absolutely terrible but you win the game, you feel all right,” Wood said. “And then you throw really good and you get a loss, it still feels like a loss.”

Garcia went deep against All-Star reliever Zach Britton in the ninth inning to break up a scoreless duel, but Baltimore rallied in the bottom half against former Oriole Jim Johnson.

Playing in his fifth major league game, Garcia drove a 1-0 pitch over the right-field scoreboard. Garcia, a 30-year-old Cuban native, has two homers since making his debut on Saturday night.

Looking for his 10th save, Johnson promptly gave up singles to Adam Jones and Wieters to put runners on the corners with no outs for J.J. Hardy, who delivered a sacrifice fly.

By David Ginsburg

AP Sports Writer