ST. LOUIS (AP) Dexter Fowler feels his swing is getting closer to what he expects.

Fowler hit his first two home runs for the St. Louis Cardinals, who swept the Pittsburgh Pirates on Wednesday with their third straight 2-1 victory over Pittsburgh.

''I feel like I've been swinging the bat for the past few days pretty good,'' Fowler said. ''I just haven't had the results. I've been sticking with it.''

Fowler, who left the World Series champion Chicago Cubs to sign an $82.5 million, five-year contract with St. Louis, was hitting .132 after going hitless in four at-bats Monday.

He rebounded with a triple on Tuesday and had three of the Cardinals' eight hits on Wednesday, including a third-inning drive into the right-field bullpen and a shot down the right-field line in the fifth, both off Gerrit Cole (1-2).

''He got a couple pitches that were up and put good swings on them,'' Pirates manager Clint Hurdle said.

Fowler said his experience helped him deal with the rough start.

''It was just something mechanical that caused a lot of problems and I got that straightened out,'' he said. ''Ever since I corrected that I've been feeling a lot better.''

Josh Bell had tied the score with a fourth-inning homer to center against Michael Wacha (2-1), who had retired his first 10 batters.

St. Louis is 6-9, winning its opener and losing nine of 11 before the sweep.

''It's huge,'' Cardinals first baseman Matt Carpenter said of the sweep. ''It was just a much better series for us.''

Wacha allowed one run and four hits in 6 2/3 innings. Matt Bowman relieved with two on and struck out Jordy Mercer to end the seventh, and Kevin Siegrist worked around a walk and two errors in the eighth. Pittsburgh left the bases loaded when Carpenter, who committed the first error, made a diving stop at first base and raced to beat Gregory Polanco to first.

''I'm just trying to stay locked in and make a play to help get us out of an ugly inning,'' Carpenter said. ''Thankfully, Siegrist made another good pitch and worked his way out of it. I was able to make a play for him, and we were able to limit the damage there.''

With closer Seung Hwan Oh unavailable after pitching the two previous games, former closer Trevor Rosenthal pitched the ninth. John Jaso singled with one out, Rosenthal threw a called third strike past Mercer, then struck out Jose Osuna for his first save this season.

Cole gave up six hits in six innings, struck out eight and walked none.

SNAPPING STREAKS

Jaso and Aledmys Diaz stopped 18 at-bat hitless streaks. Jaso, who made his first big league start in right field, singled in the fifth inning off Wacha. Diaz, the Cardinals shortstop, had a pinch-infield single in the seventh off Felipe Rivero.

TRAINER'S ROOM

Cardinals: Carpenter returned to the lineup after missing two games because of an injured ring finger on his right (throwing) hand.

UP NEXT

Pirates: RHP Tyler Glasnow (0-1, 12.15) is to make the first interleague start of his career Friday, the opener of a three-game series against the visiting New York Yankees.

Cardinals: RHP Carlos Martinez (0-2, 3.57) will open a four-game series at Milwaukee on Thursday. He is 4-1 with a 1.36 ERA in eight starts and 11 relief appearances against the Brewers.

---

More AP baseball: https://apnews.com/tag/MLBbaseball

Copyright 2017 by Associated Press. Any commercial use or distribution without the express written consent of Associated Press is strictly prohibited.