PEORIA, Ariz. -- With a little help from a late Padres' miscue, the Cubs rallied to force a 5-5 tie on Tuesday night at the Peoria Sports Complex. 

Trailing by two runs with two outs in the ninth, an error charged to Padres second baseman Clint Moore on Javier Baez's high popup allowed Emilio Bonifacio and Dustin Geiger to score the game-tying runs.  

C.J. Edwards, the No. 4 prospect in the Cubs' system according to MLB.com, got the start and allowed three runs on four hits with three walks and one strikeout in 2 2/3 innings.

Padres starter Andrew Cashner induced eight groundouts in his final tuneup of the spring and Xavier Nady and Seth Smith each had two hits to lead the Padres.

Cashner, who will start the Padres' season opener Sunday night against the Dodgers at Petco Park, allowed two hits in three innings with an unearned run. He also had one strikeout.

"The biggest thing this spring was focusing on my fastball command," said Cashner, who was with the Cubs in 2010-11.

When told he got eight ground-ball outs, Cashner smiled. "That's huge ... especially at Petco."

The Padres scored first when Nady -- trying to make the team as a non-roster invitee -- singled to right field to start the second inning. Nady's hit was misplayed into a two-base error by Ryan Kalish, allowing Nady to advance to third. Rene Rivera then followed with a sacrifice fly.

Nady had an RBI double in the third inning and Rivera followed with a sacrifice fly.

Trailing 1-0, the Cubs tied the game with a run in the third inning as Kalish dumped a soft single into left field that allowed Chris Coghlan to score. The run was unearned as Coghlan reached on an error to start the inning.

Up next: Jeff Samardzija makes his final Cactus League start Wednesday when the Cubs face the D-backs in Scottsdale, Ariz. (Listen live on free cubs.com webcast). The D-backs may be a little jet-lagged. They returned home early Monday from their two-game series against the Dodgers in Australia. Samardzija won't go too deep in the game as he prepares for Monday's season opener against the Pirates, and Chris Rusin, a candidate for the fifth spot, is slated to follow.