Updated

BALTIMORE (AP) Trevor Plouffe hit a tying single with two outs in the ninth inning and the Minnesota Twins took advantage of two errors in the 12th to beat the Baltimore Orioles 4-3 Sunday for a four-game sweep.

The Twins have won eight straight against Baltimore dating to last season.

Minnesota manager Paul Molitor was ejected in the ninth for arguing a strikeout by Miguel Sano, who tried to hold back his swing. Plouffe followed with his hit, giving closer Zach Britton his third blown save of the season.

All-Star third baseman Manny Machado moved to shortstop for the first time in his major league career in the 12th and misplayed a grounder by Eduardo Escobar, who slid in safely to second. It was Machado's second error of the game.

Third baseman Jimmy Paredes then could not handle a sharp grounder by Shane Robinson that allowed Escobar to score.

Glen Perkins (2-4), who had been dealing with a bulging disc and hadn't pitched since Aug. 17, picked up the win. Tommy Milone got his first career save.

Brian Matusz (1-3) took the loss.

The Twins improved to 4-3 on a 10-game trip that now takes them to Tampa Bay.

After allowing a two run-homer to Sano in the first, Orioles right-hander Kevin Gausman retired 17 straight batters. Gausman gave up two runs and three hits over seven innings and tied a career best with eight strikeouts.

Adam Jones and Schoop each had three hits for the Orioles.

Twins starter Mike Pelfrey gave up three runs and nine hits in 4 2-3 innings.

Baltimore had gone 0 for 5 with runners in scoring position against Pelfrey before Schoop delivered an RBI single in the third that cut the lead to 2-1.

After Jones singled and Steve Clevenger hit a ground-rule double two innings later, Schoop delivered again with another single that gave Baltimore a 3-2 lead that ended Pelfrey's day.

TRAINER'S ROOM

Twins: Blaine Boyer (right elbow inflammation) is eligible to come off the DL on Monday against the Rays, but he may need a rehab appearance. ''We'll have to make a decision whether we want to get him down to Tampa or see if he needs to go out and pitch in a game to be sure,'' Molitor said.

Orioles: Steve Pearce (left oblique strain) had a double and played nine innings in his rehab start for Double-A Bowie. He could rejoin the Orioles in Kansas City.

UP NEXT

Twins: Ervin Santana (2-4, 5.53) starts Tuesday in Tampa Bay looking to bounce back from his recent struggles. He has gone 0-4 with an 8.46 ERA in his past five starts, allowing seven homers over that stretch.

Orioles: Ubaldo Jimenez (9-7, 3.97 ERA) is looking to go deeper into the game when he faces the Royals in the series opener. He has lasted through the sixth inning in two of his past eight starts.