Updated

Baltimore, MD (SportsNetwork.com) - Matt Wieters stroked the game-winning home run in the 10th inning to lift the Baltimore Orioles to a 6-5 win over the Pittsburgh Pirates to sweep a day/night doubleheader at Camden Yards.

Wieters chased a high fastball and managed to keep it just inside the foul pole down the line in right for the win.

Wieters finished the game 2-for-5 with two RBI and two runs scored and J.J. Hardy went 2-for-3 with two RBI for the Orioles, who won the opener of the twin bill 5-1.

Nick Markakis hit a solo homer and Adam Jones added two hits and an RBI in the win.

Tommy Hunter (1-0) earned the in after recording the final two outs of the 10th. Starter Chris Tillman was touched for three runs on six hits while striking out eight over 4 2/3 innings.

Baltimore third baseman Manny Machado, who missed the first 25 games of the season while recovering from offseason knee surgery, made his season debut and went 0-for-5.

"It was awesome. First day back, walk-off win. Great game, great pitching staff. Great two games. Couldn't be happier," Machado said.

Gaby Sanchez was 4-for-6 with a triple, two doubles and an RBI and Starling Marte drove in a pair of runs for the Pirates, who were 5-for-16 with runners in scoring position and left 15 men on base. The Bucs were 6-for-30 with RISP and left 28 men on base between the two games.

"We keep fighting and fighting, and we put ourselves in scoring position and we haven't been able to cash in the way we need to," Pirates manager Clint Hurdle said.

Stolmy Pimentel (2-1) was pegged with the loss after serving up Wieters walk- off homer. Starter Brandon Cumpton allowed four runs on seven hits over 5 2/3 innings.

Ike Davis singled home Clint Barmes in the sixth to make it 4-0. Barmes was hit by a pitch to open the inning, moved to second on Chris Stewart's ground out then score when Davis dropped a base hit into left.

Baltimore rallied for four runs in the home half to tie the game. Markakis singled and moved to second on a passed ball. After Machado and Nelson Cruz followed with back-to-back groundouts, Jones doubled deep to right to score Markakis. Wieters followed with a single to plate Jones.

Steve Pearce doubled to knock Cumpton out of the game and Hardy singled to plate Wieters and Pearce.

Pittsburgh took the lead back in the seventh. Sanchez doubled and Neil Walker singled to put runners on the corners for Marte, who laced a base hit to center to bring Sanchez around.

Markakis, who had homered in the opener of the twin bill, crushed a solo homer to right-center in the home half to make it 5-5.

Both teams loaded the bases in the eighth, but were unable to push a run across.

Earlier, Pittsburgh drew back-to-back bases-loaded walks in the first inning to take a 2-0 lead.

Sanchez tripled home Andrew McCutchen in the fifth to give the Bucs a 3-0 lead. McCuctchen doubled with one out before coming around on Sanchez's first triple of the season.

Game Notes

Tillman had allowed just one earned run over 13 innings at home this season entering the contest ... The first pitch was delayed 46 minutes due to rain ... Baltimore went 3-for-8 with RISP ... Game time: 3:57.