ST. LOUIS (AP) — Iván Herrera and Jordan Walker hit home runs and the St. Louis Cardinals beat Cleveland 6-5 on Saturday night after the Guardians had already clinched the AL Central title earlier in the day.

José Ramírez and Bo Naylor homered for Cleveland, which clinched its 12th division title since 1995, when the San Francisco Giants beat the Kansas City Royals 9-0 earlier Saturday.

“This is awesome just to see the joy,” Guardians manager Stephen Vogt said. “The result of tonight’s game, it matters, but at the end of the day, we need to celebrate this. Any time you get the chance, you win the division, you’ve got to enjoy every second of it.”

Miles Mikolas (9-11) allowed one run on four hits in six innings to earn his first win since July 21 when he beat the Braves in Atlanta. He was 0-3 with a 6.80 ERA in his previous nine starts.

“It’s a really good ball club,” Mikolas said. “They like to swing the bat, so you want to jump on top, get ahead early, do your best to keep them off balance and play some great defense out there today.”

Ryan Helsley pitched a scoreless ninth to earn his 46th save in 50 chances to tie Guardians reliever Emmanuel Clase for the major league lead.

“He’s been incredible, and he’s taken the ball every time,” Cardinals manager Oliver Marmol said. “In a series like this against these guys, it’s a race to your ninth inning guy. He did a really nice job of showing that he’s one of the best closers in the game.”

Matthew Boyd (2-2) allowed two runs on four hits and three walks and struck out six before being pulled after throwing 88 pitches in four innings.

Andrés Giménez hit an RBI double off Matthew Liberatore after Ramírez hit his 37th home run of the season off JoJo Romero earlier in the eighth inning to cut the Cardinals’ lead to 6-5.

Herrera hit his fourth home run of the season off Nick Sandlin in the seventh after Masyn Winn scored on a rocket that bounced off Guardians first baseman Josh Naylor’s glove for an error to give St. Louis a 6-1 lead.

“I was looking for the fastball first pitch, and I swung at it but I barely saw it,” Herrera said. “Then I saw him shaking, saying no, and I was like he’s going to throw a starter because that’s his pitch. I just sat on the slider.”

Bo Naylor hit his 13th homer of the season into the right field bullpen to cut Cleveland’s deficit to 2-1 in the fifth.

Walker hit his fifth home run of the season to left field in the fourth inning to put St. Louis ahead 2-0.

TRAINER’S ROOM

Cardinals: Placed RHP Sonny Gray (right flexor tendinitis) on the 15-day injured list and recalled RHP Kyle Leahy from Triple-A Memphis. Gray said he would have been able to keep pitching if the Cardinals had not been mathematically eliminated from postseason contention Friday night.

UP NEXT

Guardians RHP Gavin Williams (3-10, 5.12 ERA) will face Cardinals RHP Andre Pallante in St. Louis’ home finale on Sunday.