It had to come to an end sometime.

“Sometime” was in the second inning of the Padres’ 5-1 loss to the Pirates at PNC Park on Wednesday night. That’s when Joe Musgrove’s streak of consecutive scoreless innings was halted at 32 by a Gregory Polanco solo home run.

Musgrove’s run, which dated back to last September, was tremendous. Prior to Polanco’s homer, the right-hander had yielded 11 hits and two walks while striking out 45 over that period, which included the first no-hitter in Padres history last Friday at Texas.

Musgrove, who pitched for the Pirates from 2018-20, went four innings and threw 81 pitches in his return to the PNC Park mound. He gave up one run on four hits, walking two and striking out six before giving way to reliever Pierce Johnson, who gave up Pittsburgh’s second run on a Colin Moran RBI single in the fifth.