PITTSBURGH — Just about everyone in the Pirates’ clubhouse was in a reflective mood after Pittsburgh ended its longest skid in five years.

Jung Ho Kang led off the eighth inning with a home run, leading the Pirates to a 4-3 win over the St. Louis Cardinals on Wednesday night to snap an eight-game losing streak.

Kang hit a drive deep into the bullpens in left-center off rookie Alex Reyes (1-1) for his 17th homer and third in two games. It helped snap the Pirates’ longest skid since dropping 10 straight in 2011.

The third baseman returned from the disabled list Monday after missing 15 days with a sore left shoulder.

“I really, really reflected on myself and how much I really want to win and how much I really want to play baseball,” Kang said of his time on the DL. “I really spent good time thinking about that.”

The Cardinals are percentage points ahead of the New York Mets for the second NL wild card, and the Pirates pulled within 4 ½ games of St. Louis.

Trevor Williams (1-0) allowed one unearned run in three innings for the win in his major league debut. He shared an emotional moment with his father after the game.

“We hugged and shed a few tears together,” Williams said. “It’s a moment I’m never going to forget. To be able to have my father here, the man who has been with me every step of the way on my baseball journey, meant the world to me.”

Reyes gave up one run in 3 2/3 innings and also singled off Williams in the seventh for his first major league hit.

Tony Watson worked a perfect ninth inning for his 11th save after blowing his previous two opportunities, including Tuesday night when he allowed three home runs in the ninth inning of a 9-7 loss.

“I’ve been in this situation before where you give up some and then you sit around for a couple days,” Watson said. “It’s good to get back out there. It’s good to get the win, most importantly, and end this losing streak.

The Cardinals ended a streak of 25 consecutive games with a home run, a club record.

Pirates starter Jameson Taillon pitched five innings. The rookie gave up two runs, six hits and a walk with five strikeouts.

Mike Leake went 4 1/3 innings in his first start for the Cardinals since Aug. 21 after being sidelined by the shingles virus. He gave up three runs, nine hits and a walk while striking out three.

“I wasn’t locating as well as I know as I can,” Leake said. “I’m sure being off a couple of weeks played a factor. Now I’m back on track and ready for the next one.”

The Cardinals’ Yadier Molina scored in the sixth to make it 3-3. Molina reached second base when right fielder Adam Frazier dropped his fly ball, then scored on a single by Randal Grichuk.

TRAINER’S ROOM

Cardinals: LF Matt Holliday (broken left thumb) was cleared to resume baseball activities and is hopeful of returning before the end of the regular season. He has been on the disabled list since Aug. 12.

Pirates: LF Starling Marte sat out a second straight game because of back spasms. … RHP Neftali Feliz, who was removed from Saturday’s game with arm discomfort, is still unable to play catch and likely won’t return until next week. … C Elias Diaz, who was expected to be recalled Tuesday from Triple-A Indianapolis, has instead been shut down for the season after undergoing surgery for a bacterial infection in his left leg.

CLEMENTE DAY

A large contingent of Pirates’ players, coaches, executives and their wives visited Pittsburgh King PreK-8 School on Wednesday along with Roberto Clemente’s widow and three sons as part of Major League Baseball’s annual Clemente Day celebration.

The Hall of Fame right fielder spent his entire 18-year career with the Pirates from 1955-72. Clemente died in a plane crash on New Year’s Eve in 1972 off the coast of his native Puerto Rico while attempting to deliver supplies to earthquake-ravaged Nicaragua.

UP NEXT

Cardinals: LHP Jaime Garcia (10-11, 4.41 ERA), who has lost his last three starts, faces Milwaukee RHP Junior Guerra (7-3, 2.85) on Thursday night in the opener of a four-game home series.

Pirates: RHP Ivan Nova (11-6, 4.34) is 4-0 with a 2.89 ERA in six starts since being acquired from the New York Yankees in a trade Aug. 1. He starts against Cincinnati RHP Dan Straily (11-7, 3.83) to open a four-game home series Thursday.