WILL GRAVES, AP Sports Writer

PITTSBURGH (AP) — Gerrit Cole shut down baseball’s top-hitting team, allowing just one run in six-plus innings as the Pittsburgh Pirates handed the Detroit Tigers their first loss of the season, 5-4 on Monday.

READ MORE: Michigan High School Students Participating In Safe Driving Campaign

The Tigers were trying to match the 7-0 start set by the 1984 club that went on to win the World Series.

Cole (1-0) struck out eight and walked two while giving up only three hits, helping the Pirates win their second straight home opener.

Josh Harrison, Pedro Alvarez and Corey Hart all homered for Pittsburgh. The Pirates have won three of four after getting swept by Cincinnati to open the season last week.

J.D. Martinez hit a two-run homer off Pittsburgh closer Mark Melancon in the ninth, but a late Detroit rally came up short.

Anibal Sanchez (1-1) surrendered five runs in 6 1-3 innings. Miguel Cabrera went 2 for 4 with an RBI double.

The Tigers and Kansas City began the day as the last two unbeaten teams in the majors. Detroit scored 47 runs during its six straight wins.

Looking to match the start of the Kirk Gibson-led club that won 104 games and rolled to a title 31 years ago, they instead were cooled by the hard-throwing and rapidly maturing Cole.

Taken as the No. 1 overall pick in the 2011 draft, the right-hander has symbolized Pittsburgh’s emergence from two decades of irrelevance. He keyed playoff runs in 2013 and 2014 and looked every bit the ace-in-training during a sun-splashed home opener in front of the largest regular season crowd since PNC Park opened 14 years ago.

Cole breezed through six innings, twice retiring Cabrera, before running into trouble in the seventh after loading the bases with no outs. Jared Hughes came in to protect a 2-0 lead.

His first pitched turned into a double play by Nick Castellanos and his third was a harmless popup by Alex Avila.

READ MORE: Court: Emails Between Judge, Prosecutor Didn't Spoil Allegan County Trial

Alvarez then led off the bottom of the seventh with a homer to center and Hart followed three batters later with a drive to the bleachers in left field with a two-run shot for his 1,000th career hit to make it 5-1.

Detroit couldn’t get going until the ninth. Even Cabrera, who went 11 for 14 in the weekend sweep of Cleveland, cooled off. He flied out in the first and struck out swinging to end a 10-pitch battle with Cole in the fourth in which Cabrera fouled off four straight full-count pitches before succumbing.

Still, the Tigers found a way to make it interesting in the ninth. Ian Kinsler led off with a double, scored on a double by Cabrera and Martinez followed with his fourth homer of the season to shave Pittsburgh’s lead to one.

Yoenis Cespedes singled to put the tying run at first but Castellanos hit into a double play and pinch hitter Victor Martinez struck out to end it.

TRAINER’S ROOM

Tigers: Closer Joe Nathan’s strained right flexor elbow is forcing manager Brad Ausmus to get creative at the back end of the bullpen. Joaquin Soria is filling in until Nathan returns from the disabled list, but Ausmus indicated that if there was a save situation on Monday he would have turned to Joba Chamberlain.

Pirates: The Pirates reinstated pitcher Francisco Liriano from the paternity list and sent Casey Sadler to Triple-A Indianapolis. Liriano is scheduled to start on Wednesday.

UP NEXT

Tigers: Shane Greene (1-0) makes his second start of the season on Tuesday as the three-game series continues. He tossed eight shutout innings in a win over Minnesota last Thursday. Greene is 4-0 with a 2.70 ERA in six career road starts.

Pirates: A.J. Burnett makes his first start in Pittsburgh as a Pirate since 2013. He pitched 5 1-3 innings while getting a no decision against Cincinnati last Thursday. The 38-year-old Burnett is 14-12 with a 2.76 ERA in 35 career starts at PNC Park.

MORE NEWS: Police: 2 Men Shot, Killed Outside Hazel Park Rental Hall

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)