SAN DIEGO — The San Diego Padres have traded left fielder Melvin Upton Jr. to the Toronto Blue Jays for minor league right-hander Hansel Rodriguez.

The trade, which continues the Padres’ rebuilding, was announced Tuesday morning, hours before the Padres played at Toronto in the middle game of a three-game series.

Upton has had a big season for the Padres, who are mired in fourth place in the NL West. He is hitting .256 with 16 home runs, 45 RBIs, 46 runs scored and 20 stolen bases. He’s hit three walk-off home runs.

The 19-year-old Rodriguez was 2-1 with a 3.06 ERA in six starts for the Rookie-Level Bluefield Blue Jays.

Padres general manager A.J. Preller said the deal had been in the works for a few weeks.

Upton has rejuvenated his career after struggling after signing a big contract with the Atlanta Braves.

“He’s played well,” Preller said. “He’s really played both sides of the ball. He has a chance to be a 30-30 guy. He’s hit some big home runs in some big spots and has played tremendous defense for us in left field.”

The Padres reportedly will pay all but $5 million of the $22.5 million remaining on Upton’s contract.

Upton and closer Craig Kimbrel were obtained in a trade with Atlanta on the eve of opening day 2015. Upton missed a good deal of last season with a foot injury. His brother, Justin, also was with the Padres last season.

Kimbrel was traded to Boston in the offseason for prospects and Justin Upton left as a free agent.

Main daytime sports producer for The Denver Post. Previously he was the online prep sports editor. Prior to that, he covered Adams County and Aurora in the YourHub section. He also writes about beer, professional wrestling and video games.

More in Colorado Rockies

Nolan Arenado's future is likely to remain a hot topic well into the 2019 season, but suggestions that a trade might be brewing between the Rockies and Yankees to ship the all-star third baseman to New York are unfounded.