Updated

St. Louis, MO (SportsNetwork.com) - Kolten Wong opened the scoring with a two- run double and ended the game with a two-out homer in the bottom of the ninth to send the St. Louis Cardinals to a 5-4 win over the Pittsburgh Pirates on Tuesday at Busch Stadium.

Wong belted a 3-2 pitch from Ernesto Frieri (1-1) over the wall in right field to give the Cardinals their second straight walkoff win. Matt Adams was the hero on Monday with a two-run homer in the ninth.

"When I hit it, I knew it was gone," said Wong. "For a moment I forgot to run. Just excited to get home and be the guy jumping into the dog pile. It's something I'll always remember."

It's the first time the Cardinals have had consecutive game-ending home runs since Albert Pujols twice beat the Chicago Cubs on June 4-5, 2011.

Matt Holliday doubled home two runs for the Cardinals, who have won five of their last seven. Wong's blast made a winner of Trevor Rosenthal (1-4), who worked around a hit and a walk in the top of the ninth.

Pedro Alvarez and Andrew McCutchen each hit two-run homers for Pittsburgh, which had won three straight before suffering heartbreaking defeats each of the last two nights.

"It's not the first time we've had two tough losses and it probably won't be the last time," said Pirates manager Clint Hurdle. "One swing of the bat changed the game. You shower up and get ready to play tomorrow."

Vance Worley started for the Pirates and surrendered four runs on nine hits with three strikeouts in five innings. Carlos Martinez went the first six innings for St. Louis and yielded four runs on eight hits with two walks and six strikeouts.

The Cardinals opened the scoring in the second with a two-out rally. Worley retired the first five batters he faced, but Jhonny Peralta stroked a two-out single and went to third on a base hit by Oscar Taveras. Wong followed with a drive to the gap in right-center field for a two-run double.

Pittsburgh put two on with two outs in the third, but Neil Walker flied to center. The Pirates, though, tied it in the fourth on Alvarez's 100th career homer. Ike Davis drew a walk in front of Alvarez, who drilled a pitch over the wall in right-center field for his 14th home run of the season.

McCutchen gave the Pirates the lead in the fifth with his 14th homer of the year. He crushed a shot over the wall in right field that also scored Gregory Polanco, who led off the inning with his third single of the game.

Walker followed McCutchen's blast with a triple, but was picked off third on a sharp throw from catcher Yadier Molina. The play was reviewed and upheld.

St. Louis responded immediately with two in the bottom of the inning to tie it. Matt Carpenter and Jon Jay each singled with one out and both scored on a double to left-center by Holliday.

"He was up in the zone more than in the previous outings and wasn't as sharp in the strike zone," Hurdle noted about Worley. "His overall command wasn't as sharp."

The Pirates had an opportunity against Rosenthal in the ninth when Jordy Mercer singled with one out and pinch-hitter Josh Harrison followed with a walk. Polanco then flied to shallow center and Starling Marte went down swinging.

Pittsburgh finished 0-for-7 with runners in scoring position after an 0-for-10 performance in Monday's 2-0 loss.

"We haven't been getting them the last two nights," Hurdle said about clutch hits. "You keep sending your guys up there and grind out quality at-bats."

Game Notes

Carpenter finished 2-for-4 and snapped an 0-for-10 skid with a first-inning infield single ... Adams was 1-for-3 and has eight hits in last 13 at-bats. He has a six-game hitting streak ... Walker extended his hitting streak to 10 games, his second double-digit streak of the season. He hit in 11 straight from May 20-30 ... Hurdle said lefty Francisco Liriano, sidelined since June 11 with a strained oblique, is expected to make a start before the All-Star break, likely this weekend in Cincinnati ... Pittsburgh's Gerrit Cole will likely be placed on the disabled list Wednesday because of a lat injury to make room for Brandon Cumpton, who is expected to be recalled from Triple-A Indianapolis to make the start against the Cardinals.