DENVER -- Javier Baez made his major league debut a memorable one for himself and his family.
Baez, a prized prospect called up before the game, played his first game in the big leagues with his family sitting behind home plate. He struck out in three of his first five at-bats before hitting Boone Logan's first pitch of the 12th an estimated 414 feet into the Rockies' bullpen.
"I faced him before, and he threw me all curveballs," Baez said. "He's got a good curveball, so I wasn't sitting on the curveball, I was trying to hit a fastball."
When he crossed home plate, he pointed to his personal fan club and went back to the dugout, where he was greeted with cheers.
"Everybody was going crazy," he said.
Baez nearly had his first hit in the seventh, when he a drove a ball hard to right field, but it was caught to end the inning. He didn't miss, however, when he got a fastball in the 12th.
"He had a few strikeouts, but it wasn't for anxiousness," Chicago manager Rick Renteria said. "He didn't seem anxious at all. He got the first pitch he can hit and drove it."
Both teams scored a run in the 11th to extend the game.
Nolan Arenado homered, and Logan (2-2) took the loss for the Rockies, who have dropped five straight.
Rockies starter Brett Anderson allowed just one hit through three innings but left after one pitch in the fourth due to back spasms.
"His back locked up, and it doesn't look too good now," Rockies manager Walt Weiss said.
Franklin Morales came on and threw two scoreless innings before Castillo led off the sixth with his eighth home run of the season to cut Colorado's lead to 3-1.
The shaky Colorado bullpen faltered in the seventh. Three relievers combined to walk six batters in the inning, three of which scored to give the Cubs a 4-3 lead. The Cubs drew nine walks and only had six hits.
Arenado tied it in the bottom of the seventh with his 10th home run of the season.
The Rockies took a 2-0 lead in the second on Brandon Barnes' two-run double over the bag at third base. Colorado added another run on a walk and three hits in the fifth inning.
Chicago right-hander Travis Wood left the game after six innings with a 4-3 lead but came away without a win. He has 10 quality starts this season but hasn't had a victory since June 15. The Cubs' rotation has 56 quality starts but only 26 wins this year.
Cubs: Right-handed reliever Kyuji Fujikawa is with the team and close to returning after missing more than a year following Tommy John surgery. In 12 rehab outings this year, Fujikawa has a 0.77 ERA and 13 strikeouts in 11 2/3 innings. He most recently pitched in a major league game on May 26, 2013.
Rockies: Shortstop Troy Tulowitzki is eligible to come off the disabled list Wednesday but hasn't started baseball-related activities. The leading hitter in the major leagues has been out since he suffered a left hip-flexor strain July 19 in Washington. Manager Walt Weiss said Tulowitzki could return in the next week.
Cubs: Jake Arrieta (6-2, 2.11) will try to duplicate his strong start from this past week, when didn't allow a Rockies' baserunner until late into the fifth inning in the Cubs' win at Wrigley Field. The righty allowed just three hits in seven innings of work but faces a stiffer challenge at Coors Field.
Rockies: Right-hander Jordan Lyles (5-1, 3.52) will return to the rotation after missing two months with a fractured left hand. Lyles, acquired in an offseason trade with Houston, was pitching effectively before he suffered the injury on a comebacker against Arizona on June 4.