Sonny Gray pitched seven innings of two-hit ball, and the St. Louis Cardinals beat the slumping Pittsburgh Pirates 5-0 on Wednesday for their fifth straight victory.Gray (4-1) struck out eight and walked one in his first win since April 14. The right-hander went 0-1 with a 5.51 ERA in his previous three starts.The Cardinals returned to .500 at 18-18, including a 15-6 record at home. They are 4-2 against the Pirates this year after finishing a three-game sweep.Masyn Winn hit two RBI doubles. Lars Nootbaar had three hits, and Victor Scott II scored all the way from first twice.The Pirates (12-26) were shut out for the eighth time. They have lost seven in a row and 10 of 11 overall.St. Louis jumped in front with two runs in the third against Mitch Keller (1-4). Scott walked and scored on Nootbaar’s hit-and-run single to right. Winn added a bloop RBI double.Scott extended his hitting streak to a career-high eight games when he hit a leadoff single in the fifth. He scored on Winn’s one-out double.Jordan Walker added a two-run single in the eighth.Keller allowed seven hits in six-plus innings. He struck out six and walked three.The Pirates finished with four hits.Nolan Arenado was scratched from the St. Louis lineup with back spasms.

ST. LOUIS (AP) —

Sonny Gray pitched seven innings of two-hit ball, and the St. Louis Cardinals beat the slumping Pittsburgh Pirates 5-0 on Wednesday for their fifth straight victory.

Gray (4-1) struck out eight and walked one in his first win since April 14. The right-hander went 0-1 with a 5.51 ERA in his previous three starts.

The Cardinals returned to .500 at 18-18, including a 15-6 record at home. They are 4-2 against the Pirates this year after finishing a three-game sweep.

Masyn Winn hit two RBI doubles. Lars Nootbaar had three hits, and Victor Scott II scored all the way from first twice.

The Pirates (12-26) were shut out for the eighth time. They have lost seven in a row and 10 of 11 overall.

St. Louis jumped in front with two runs in the third against Mitch Keller (1-4). Scott walked and scored on Nootbaar’s hit-and-run single to right. Winn added a bloop RBI double.

Scott extended his hitting streak to a career-high eight games when he hit a leadoff single in the fifth. He scored on Winn’s one-out double.

Jordan Walker added a two-run single in the eighth.

Keller allowed seven hits in six-plus innings. He struck out six and walked three.

The Pirates finished with four hits.

Nolan Arenado was scratched from the St. Louis lineup with back spasms.