CHICAGO (AP) — Jake Arrieta’s winning streak ended at 20 games when Patrick Corbin and the struggling Arizona Diamondbacks beat the Chicago Cubs, 3-2, on Sunday.

The reigning NL Cy Young Award winner, Arrieta had gone 24 regular-season starts without a loss since Cole Hamels pitched a no-hitter for Philadelphia at Wrigley Field on July 25. Arrieta did lose to the New York Mets in the NL Championship Series last season and was 2-1 in the playoffs.

READ MORE: 'John Doe' Who Accused Former Blackhawks Video Coach Brad Aldrich Of Sexual Abuse Identifies Himself As Kyle Beach

Arrieta (9-1) lasted five innings this time, allowing three runs and nine hits. He threw 108 pitches and struck out a season-high 12 while walking one.

The Cubs lost for only the second time in 12 games and finished 8-2 on their homestand. Both losses came in starts by Arrieta after they won 23 in a row with him on the mound.

Corbin (3-5) went seven innings to lead Arizona to its second victory in seven games. The left-hander gave up two runs and five hits, struck out five and did not walk a batter.

Tyler Clippard pitched the eighth and Brad Ziegler worked the ninth for his 39th consecutive save and 11th this season. He walked pinch-hitter Anthony Rizzo with two outs before retiring Miguel Montero on a groundout.

Chris Hermann had three hits and scored a run for Arizona. Yasmany Tomas hit a two-run double and Paul Goldschmidt added an RBI single as the Diamondbacks avoided a three-game sweep.

Javier Baez hit a solo homer for Chicago in the sixth. Cubs manager Joe Maddon was ejected for the first time this season in the seventh after Trevor Cahill walked Goldschmidt on a 3-2 pitch with two outs.

READ MORE: Chicago Weather: Showers Coming Thursday

The Cubs thought Goldschmidt swung and appealed to first base umpire Tripp Gibson. When Goldschmidt was awarded first, Cahill threw his arms up in disgust and Maddon came out to argue.

TRAINER’S ROOM

Diamondbacks: Arizona hopes to activate OF David Peralta (right wrist inflammation) from the disabled list on Monday, though manager Chip Hale said the team would give Peralta an extra day or two if he needs it. Peralta was to play his final rehab game for Triple-A Reno on Sunday. … Hale said he got a good report on Shelby Miller (sprained right index finger) after the right-hander threw five scoreless innings in an extended spring game Saturday.

Cubs: Chicago got a scare in the first inning when Jorge Soler crumpled to the ground after being hit in the right foot by a pitch. He stayed down for a few minutes while being tended to but remained in the game. … Chicago held Rizzo and OF Jason Heyward out of the starting lineup, giving them some rest.

UP NEXT

Diamondbacks: LHP Robbie Ray (2-4, 4.74 ERA) starts the opener of a nine-game homestand against Tampa Bay RHP Chris Archer (3-7, 4.75).

Cubs: LHP Jon Lester (6-3, 2.29) looks to remain unbeaten against Philadelphia when the Cubs start a nine-game trip against LHP Adam Morgan (1-4, 7.07) and the Phillies. Lester, coming off a complete-game win against the Los Angeles Dodgers, is 5-0 with a 1.71 ERA in seven starts against the Phillies.

MORE NEWS: View Live Radar

(© 2016 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.)