SAN DIEGO | Rookie Fernando Tatis Jr. hit his second leadoff home run in two games — and team-record sixth this season — and the San Diego Padres scored five unearned runs in the sixth inning to beat the Colorado Rockies 9-3 Thursday night.

Tatis broke the old record of five leadoff homers by Will Venable in 2011 when he drove a 1-0 pitch from Jon Gray (10-8) into the home run porch in the right field corner. It was the 22nd of the season for Tatis, who hit a leadoff homer in a 3-2 loss at Seattle on Wednesday.

Manuel Margot homered in the eighth for the Padres, his ninth.

The Padres led 3-1 after two before the Rockies tied it on Trevor Story’s RBI double in the third and Charlie Blackmon’s leadoff homer in the fifth, his 24th.

San Diego jumped ahead 8-3 when the Rockies fell apart in the sixth. The Padres scored five unearned runs on two hits, two walks, two errors and a wild pitch. The inning was extended by Story’s two-out throwing error on Luis Urias’ grounder, which allowed Francisco Mejia to score. Another run scored on Gray’s wild pitch. Gray made way for Jairo Diaz, whose throwing error on Tatis’ dinker allowed another run before Wil Myers hit a two-run double.

Gray allowed seven runs — three earned — on six hits in 5 2/3 innings, with four strikeouts and two walks.

Matt Strahm (5-8) pitched two innings for the win.

Padres starter Eric Lauer allowed three runs and 10 hits in four-plus innings, struck out two and walked none.

The Rockies had runners on first and second with no outs in the fourth before the Padres used some nice defense to get out of the jam. Right fielder Hunter Renfroe threw out Ryan McMahon trying to score from second on Tony Wolters’ single to right and then Urias and Tatis, the second baseman and shortstop, turned a double play on Gray’s grounder.

FOR EL PASO

In the wake of the mass shooting in El Paso, the Padres wore black “EP” caps during batting practice and autographed them to have their Triple-A affiliate, the El Paso Chihuahuas, auction with the proceeds benefiting the El Paso Victims Relief Fund. The Padres are making a $30,000 donation to the fund via a joint contribution from the Padres Foundation, executive chairman Ron Fowler and general partner Pete Seidler said.

BILL WALTON

As part of Grateful Dead Night, San Diego native, basketball Hall of Famer and noted Deadhead Bill Walton played bongo drums during a pregame concert by local tribute band Electric Waste Band in the Park at the Park just beyond center field. Walton also threw out the ceremonial first pitch, which he bounced wide of reliever Trey Wingenter. Walton asked for a re-do and threw a strike. He then joined in on the plate meeting with the umpires and managers, holding court for about three minutes.

TRAINER’S ROOM

Padres: Placed rookie LHP Adrian Morejon on the 10-day injured list, retroactive to Wednesday, with a left shoulder impingement, and reinstated LHP Jose Castillo from the 60-day IL.

UP NEXT

Rockies: LHP Kyle Freeland (3-9, 7.24) is scheduled to start Friday night. He’s 2-2 with a 4.03 ERA in eight appearances, including seven starts, against San Diego.

Padres: Rookie RHP Cal Quantrill (4-3, 3.57) faces the Rockies for the second. He earned the win in a 16-12 victory at Coors Field on June 14. He allowed four runs and six hits in five innings.