SCOTTSDALE, Ariz. -- Charlie Blackmon belted a walk-off, three-run homer in the bottom of the ninth to give the Rockies a 9-6 victory over the Cubs on Wednesday night at Salt River Fields at Talking Stick.

Charlie Culberson's sacrifice fly after Cubs reliever Paolo Espino loaded the bases tied the game ahead of Blackmon's blast.

After Javier Baez's long solo homer in the eighth, the Cubs trailed by two with one out in the top of the ninth. Luis Valbuena hit a solo homer off Rockies reliever Greg Burke before Chris Valaika hit a bases-loaded grounder to short to force a run across. Another scored on the play when Rafael Ynoa threw wildly to second base.

Baez's fifth home run tied him with the Reds' Chris Heisey and Jordan Danks of the White Sox for the Cactus League lead. Baez, the Cubs' top prospect, belted four homers in 17 spring games in 2013 and has passed that total in 13 games this spring.

Before the ninth-inning rallies, Carlos Gonzalez's homer, off Cubs starter Carlos Villanueva, was the big swing in a game that featured conceivable regular-season batting orders for both teams.

Rockies left-hander Franklin Morales was in and out of the strike zone but limited the Cubs to one unearned run and one hit, with three strikeouts and three walks. Morales is competing for a rotation spot -- one opened by Jhoulys Chacin's right shoulder injury, which could keep him out until May -- with righty Jordan Lyles.

Morales also started the Rockies' third-inning rally with a ground-rule double. He looked unsteady running and was visited by manager Walt Weiss and athletic trainer Heath Townsend, the trainer at Triple-A Colorado Springs who was working the game. Morales felt fine enough to lumber to third on Charlie Blackmon's single and take his time crossing the plate on Gonzalez's second homer of the spring.

Morales said he actually felt tightness in his left groin while issuing a walk to Darwin Barney in the top of the third and was trying to protect the injury while running. Morales gave up his lone hit and struck out one in the fourth.

"When I hit, I didn't feel anything but I made sure I didn't run hard," said Morales, who threw 69 pitches.

However, Morales walked leadoff men in the first and third innings. The first one became a run when Rockies first baseman Justin Morneau dropped a pickoff throw to allow Emilio Bonafacio to advance two bases. Bonafacio scored on Justin Ruggiano's fielder's choice grounder.

Morales was more sharp with his breaking pitches than his fastball.

"Early in the game, I threw a lot of fastballs up, but I made the adjustments with my breaking pitch," Morales said.

Villanueva, who could pitch in starting and relief roles for the Cubs, struck out eight in his four innings. He gave up three runs, three hits and a walk.

Barney doubled in the fifth to drive in Bonafacio, who reached on a two-out infield hit against LaTroy Hawkins.

The strikeouts were some form of revenge for Villanueva, who is 0-3 with an 11.57 ERA in 13 career games against Colorado.

"This team has given me nightmares," Villanueva said. "They had their full squad out there. The strikeouts are nice, but the fact I was getting swings and misses and quick outs, I'll take that any day. I felt I could've gone six, seven innings, three runs."

Villanueva was impressed by Gonzalez's homer.

"I'll take it now, rather than the season," Villanueva said. "That guy can hit. You don't need me to tell you that. I've tried to go backdoor with the slider, and it just stayed on his swing -- it's a perfect swing path for him and he did what he's supposed to do. That's why he is who he is."

Up next: Jeff Samardzija will tune up for his Opening Day start as the Cubs play host to the Mariners at Cubs Park on Thursday. The lineup will feature Mike Olt's debut at third base. Olt, acquired last July from the Rangers, has been limited to first base and designated hitter because of a tender right shoulder. Tsuyoshi Wada, a candidate for the fifth spot in the rotation, will throw in a Minor League game as well. The game will be broadcast on Comcast SportsNet and also on Cubs.com.