Adam Wainwright gave up two hits, and only one of them left the infield.

CardinalsAnd that was with two outs in the ninth inning.

Wainwright struck out eight batters in his seventh career shutout and the St. Louis Cardinals routed the Washington Nationals 8-0 on Thursday night to open a four-game series.

Wainwright (3-1) allowed an infield single to Ian Desmond in the second inning and a base hit to Adam LaRoche in the ninth. In between, he was rarely tested in his 17th career complete game.

“That’s a very good team,” said Wainwright. “If I had balls in the middle of the plate like I did last game they probably would have hit some home runs. They have big, strong hitters that can do some damage so it was important for me to live on the edges (of the plate) a little more and throw some good quality pitches.”

The right-hander threw 75 of his 110 pitches for strikes, walked three and saw his earned-run average dip 77 points to 1.80 in four starts. He helped get the Cardinals back on the winning track after they lost the finale of a three-game series Tuesday in Milwaukee, where they started an 11-game road trip. They had won four in a row before that.

“We ran into a really tough pitcher,” said LaRoche. “Adam had his stuff and we just didn’t come out to play. Sloppy game. We never really had any momentum.”

Matt Adams had three RBI and Matt Holliday knocked in two as the Cardinals ticked off 14 hits, including seven against Nationals starter Taylor Jordan (0-2).

The Cardinals’ first seven runs were charged to Jordan, who went 5 1/3 innings and gave up two walks with four strikeouts. Two of the runs were unearned as the Nationals made three errors behind Jordan in his 12th career start.

The Nationals, who started an 11-game homestand, had a four-game winning streak snapped at their park.

Bryce Harper returned for Washington after he was scratched from Wednesday’s game in Miami because of tightness in his quad and went hitless in four at- bats.

Jordan threw 26 pitches in the first inning and the Cardinals scored three runs — the first on Holliday’s no-out double inside the third base bag to score Matt Carpenter, who had reached on an error by Desmond at short.

Adams’ ground out scored another and Yadier Molina knocked in Holliday with a single through the left side to make it 3-0.

Two more Nationals errors — one by Desmond, who bobbled a ball; and one by second baseman Danny Espinosa, who dropped the ball trying to turn a double play — led to another Cardinals run in the fourth inning.

Nationals manager Matt Williams called the game “probably the worst one we’ve played” this season.

The Cardinals loaded the bases with one out, but Jordan escaped by getting a couple of grounders. He bobbled the first one himself, but threw home in time for a force out.

Blake Treinen replaced Jordan after St. Louis loaded the bases again with one out in the sixth inning. Holliday and Adams delivered consecutive two-out base hits to knock in three more runs and Kolten Wong added an RBI single in the seventh.