MINNEAPOLIS — Rookie Max Kepler continued to show promise for the future of the Minnesota Twins, though the present-day struggles led to one member of the team being traded away.

Kepler continued his midseason surge with a game-tying home run among two hits and two RBIs as the Minnesota rallied to beat the Baltimore Orioles 6-2 on Thursday night.

The teams were squeezing in a make-up game from a May 9 postponement with Minnesota in the middle of a homestand and Baltimore heading for a weekend series at Toronto.

Following the game, the Twins traded Eduardo Nunez, the team's lone All-Star representative this year, to the San Francisco Giants for Triple-A left-hander Adalberto Mejia.

"The Twins are a great organization and made me feel like at home," Nunez said. "But at the end of the day, it's business, baseball. You go wherever is best for you and the team. The Giants want me and I'm going to go there and do my best."

Minnesota had lost three in a row and was coming off a disappointing two-game sweep at home to the Atlanta Braves in a matchup of two teams with the majors' worst records.

Kepler hit his 11th home run off reliever Odrisamer Despaigne (0-2) leading off the sixth inning to tie the game 2-all after Baltimore starter Ubaldo Jimenez lasted five innings in his first start since July 8. Kepler had an RBI double as part of a four-run seventh.

Kepler played in nine April games, hitting .167 before being sent back to Triple-A. He was recalled on June 1 and has 38 RBIs in his past 49 games. Kepler has eight home runs in 22 July games.

"I like how he's making adjustments to how he's being pitched," Twins manager Paul Molitor said. "People try to tie him up inside. He got a little cutter in there that was fairly in there pretty good, but he pulled his hands through and was able to hit the ball out of the park. He's doing well overall.

"For his first go round here, we're just looking for continued improvement."

Minnesota's Ryan Pressly (5-5) combined with two other relievers to allow just two hits the final three innings.

Kepler's work negated an effective spot start by Jimenez, who allowed one run and five hits and struck out eight in his first appearance since a 1-1/3 inning start on July 8. Jimenez had been in a bit of limbo with the Orioles since being ousted from the starting rotation with a 7.38 ERA.

Baltimore kept Jimenez off the mound in games, though. He never pitched out of the bullpen but did spend three days on the paternity leave list.

"It's been a long time since I faced hitters; it felt great to be out there and be with my teammates," Jimenez said.

Adam Jones homered on the first pitch of the game for the Orioles, who head to play the Blue Jays with a 1 1/2 game lead over Toronto in the AL East.

"We thought tonight was a big game," Baltimore manager Buck Showalter said. "We'll think tomorrow, we'll think the day after that and the day after that and the day after that. .. I'm just proud that people deem it important to beat us. We think every game is important."

PLAYS AT THE PLATE

Minnesota was able to keep the game close in the fourth by throwing two runners out at the plate. Chris Davis singled and Mark Trumbo doubled to open the inning.

Davis was thrown out trying to score from third when Eduardo Escobar fielded a grounder from Jonathan Schoop and threw to catcher Juan Centeno. Pedro Alvarez followed with a single to right, but Kepler threw home to get Trumbo for his fifth assist in 58 games.

ROSTER MOVE

To replace Nunez on the active roster, the Twins recalled infielder Jorge Polanco from Triple-A Rochester.

In three previous stints in Minnesota this season, Polanco hit .231 with three doubles, a home run and four RBIs in 13 games. He was hitting .276 with nine home runs and 39 RBIs in 75 games for Rochester.

Interim general manager Rob Antony said Escobar will likely get the first chance to take Nunez's spot at shortstop.

TRAINER'S ROOM

Twins: 3B Trevor Plouffe (fractured left rib) took batting practice on Thursday. Twins manager Paul Molitor said Plouffe could possibly start a rehab assignment on Friday.

UP NEXT

Orioles: Baltimore follows its one-game stop in Minnesota with RHP Kevin Gausman (2-7, 3.77 ERA) taking the mound. Gausman earned just his second win in 17 starts in beating Cleveland in his last outing with seven scoreless innings. The Blue Jays will start RHP Marco Estrada (5-4, 2.94).

Twins: RHP Ricky Nolasco (4-8, 5.40) opens the weekend home series against the Chicago White Sox, who counter with LHP Jose Quintana (8-8, 2.97). Nolasco is coming off his shortest start of the season when he allowed six runs and six hits in two innings against Boston.