CHICAGO (AP) —Starlin Castro’s ninth-inning double off the center-field wall gave the Chicago Cubs a 4-3 win Friday over the San Francisco Giants.

Chicago led 2-0 heading into the top of the ninth, but closer Kyuji Fujikawa allowed a one-out RBI single by Pablo Sandoval and hit Buster Posey with a pitch before Brandon Belt’s two-out double down the right-field line.

Pinch-hitter Dioner Navarro tied the game with a home run to lead off the ninth off Giants closer Sergio Romo. The home run was the Cubs’ first pinch-homer of the season.

Matt Cain made his first start since giving up nine earned runs in 3 2-3 innings of work in a 14-3 loss to St. Louis on April 7. The Giants ace allowed seven hits — two were solo home runs to David DeJesus and Castro– while striking out six and walking two.

Villanueva pitched 7 1-3 shutout innings and allowed just three hits while striking out three.

The strong start was Villanueva’s second in a row for the Cubs. Villanueva made his Cubs debut April 6 at Atlanta and permitted the Braves just one run in 6 2-3 innings. Once again, Villanueva was handed a no-decision after the Cubs bullpen squandered a lead.

After allowing Angel Pagan to lead off the game with a single, Villanueva retired the next 12 batters until Pence singled with one out in the fifth.

Villanueva was replaced with one out in the eighth by James Russell after giving up a single to Gregor Blanco. Brandon Crawford singled off Russell, but the Cubs left-hander got pinch-hitter Andres Torres to ground into a 5-4-3 double play.

The Cubs squandered a scoring chance in the first. After DeJesus led off with a double, Starlin Castro grounded out to short before Anthony Rizzo and Soriano struck out.

Chicago took a 1-0 lead in the bottom of the third when DeJesus led off with his home run. DeJesus’ blast was helped by a wind that was blowing out to right field.

DeJesus had three hits.

In the fourth, the Cubs left two runners on base when Villanueva grounded out to short. DeJesus led off with a double, and with two outs No. 8 hitter Luis Valbuena was walked to get to Villanueva.

After he singled to end Villanueva’s run of retired hitters, Pence stole second but was stranded when Brandon Belt lined out to center and Blanco grounded out to first.

The Cubs doubled their lead in the bottom of the fifth when Castro homered, taking a 1-2 pitch from Cain and lining it into the left-field bleachers.

San Francisco threatened in the sixth after Crawford led off with a walk and was sacrificed to second by Cain. With two outs, Marco Scutaro’s sharp grounder to third was snagged by Steve Clevenger, who threw to first to get the San Francisco second baseman.

Villanueva had a chance to pad his lead with two outs in the sixth and runners on the corners but he grounded out softly to third to end the inning.

NOTES: Los Angeles Dodgers manager Don Mattingly said Thursday that San Diego Padres outfielder Carlos Quentin shouldn’t play again until the injured Zack Greinke can pitch. When asked about Mattingly’s comments before Friday’s game, Giants manager Bruce Bochy said “that’s a great point.” . Saturday’s pitching matchup pits the Giants’ Madison Bumgarner against Chicago’s Jeff Samardzija. . Cubs second baseman Darwin Barney was presented his 2012 Gold Glove prior to Friday’s game. He is on the 15-day disabled list with a left knee laceration but is expected to return to the lineup Tuesday against Texas. . Scutaro was back in the lineup after getting a day off Thursday. He was 1-for-4. . Usually a catcher, Clevenger made his first career start as a third baseman. Before Friday, Clevenger had played two games at third.

Copyright 2013 by STATS LLC and The Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and The Associated Press is strictly prohibited.

Watch & Listen LIVE