CHICAGO — Chicago Cubs left-hander Jon Lester’s bid for a second career no-hitter has been broken up by Hunter Pence, who homered with two outs in the seventh inning.

The San Francisco right fielder belted a 1-2 cutter into the left-field bleachers to cut the Cubs’ lead to 2-1 on Friday.

Lester walked Buster Posey with two outs in the first inning and followed by setting down 18 straight before Pence’s second homer in as many days.

The Giants had been held hitless in 12 2/3 consecutive innings dating to Thursday’s 5-4 loss to Chicago.

The 32-year-old Lester threw a no-hitter on May 19, 2008, for Boston against Kansas City. That came less than two years after he was diagnosed with cancer.

He was trying to become the second Cubs pitcher to throw a no-hitter this year after Jake Arrieta shut down Cincinnati on April 21.