CHICAGO (AP) — Cole Hamels threw eight innings of three-hit shutout ball, Javier Báez hit a two-run homer and the Chicago Cubs topped the St. Louis Cardinals 3-1 on Friday.

The Cubs have won four of five since being swept in a three-game series at St. Louis last weekend. The Cardinals opened a season-high 10 game road trip that will take them Miami and then to New York to face the Mets.

Before starting up at Wrigley Field, the Cubs finalized a three-year contract with Craig Kimbrel that guarantees the closer $43 million.

Hamels (5-2) was sharp again, striking out a season-high 10 and walking one after a hard-luck loss last Sunday at St. Louis when he allowed two hits and one unearned run in seven innings. Harrison Bader, who doubled in the second, was the only Cardinal to reach second base off the left-hander.

Hamels struck out the side in the eighth to finish strong. Pedro Strop gave up a home run in the ninth to Paul DeJong before finishing for his sixth save in eight chances.

Báez's 16th homer was his third in five games. Victor Caratini had two hits, including an RBI double.

Cardinals starter Miles Mikolas (4-6) exited after four innings with a bruised right forearm. He was struck by David Bote's hard comebacker, knocked the ball down and tossed to first for the final out in the bottom of the fourth.

Giovanny Gallegos entered and pitched two scoreless innings as three Cardinals relievers shut out the Cubs the rest of the way.

Baez went deep to right center on an 0-2 pitch with two outs in the first for a 2-0 lead.

With two outs in the fourth, Jason Heyward and Caratini lined back-to-back doubles to make it 3-0.

The 31-year-old Kimbrel helped Boston win the World Series, then turned down a $17.9 million qualifying offer from the Red Sox in November.

Kimbrel was optioned to Triple-A Iowa and will report to the Cubs training facility in Mesa, Arizona. The right-hander had been training in Florida as he awaited a deal.

Cubs president of baseball operations Theo Epstein didn't set an exact timetable for Kimbrel's return to the majors.

LONDON TOWN

Major League Baseball confirmed a two-game series in London between the Cubs and Cardinals at West Ham's Olympic Stadium on June 13-14, 2020.

WACHA SET TO RETURN TO ROTATION

Struggling RHP Michael Wacha (3-2, 6.30 ERA) is the tentative starter when the Cardinals open a three-game series Monday in Miami. He's come out of the bullpen for his last two appearances after giving up six earned runs in 4 2/3 innings in a start against Kansas City on May 22.

TRAINER'S ROOM

Cardinals: C Yadier Molina (right thumb tendon strain) is eligible to come off the 10-day injured list Saturday, but manager Mike Shildt said the nine-time All Star won't rejoin the club until later in the Cardinals road swing. "We can't push it," Shildt said. "There's a tear, it has to heal, for grip strength and long-term."

UP NEXT

Cardinals RHP Jack Flaherty (4-3, 3.76) faces Cubs LHP Jon Lester (4-4, 3.32) on Saturday night. Lester rebounded from a three-game personal slump with a solid seven-inning win over the Angels last Monday when he allowed a run on four hits. Flaherty beat the Cubs in a five-inning outing in St. Louis last weekend.