CHICAGO — On the 10th anniversary of Mark Buehrle's perfect game in Chicago, Marlins left-hander Caleb Smith thought it might be his turn to grab a similar place in baseball history.

"I definitely was thinking about the no-hitter and the perfect game the entire time," Smith said. "You kind of try to put it out of your mind, but it's kind of hard to."

Maybe next time. Smith retired his first 17 batters before allowing two walks and a hit, then cruised through seven innings of two-hit ball to lift Marlins over the Chicago White Sox 5-1 Tuesday night.

Curtis Granderson hit a two-run homer to cap Miami's four-run fourth inning against Dylan Covey (1-6). Harold Ramirez added a solo shot in the fifth as the NL-worst Marlins ended a four-game skid.

Smith (6-4) worked flawlessly through a depleted White Sox lineup before walking Adam Engel and Leury García with two outs in the sixth. Jon Jay followed by grounding a single to right for Chicago's first hit and only run.

The walk on a 3-1 count to Engel, Chicago's No. 9 hitter, disrupted Smith briefly, but didn't undo the left-hander as he went on to match his longest outing this season.

"All right, I'm going to throw a fastball right here," Smith said. "Try to throw it as fast as I can and throw it in the zone and whatever happens happens. Unfortunately I didn't get it in the zone."

Smith struck out nine — including five straight over the fifth and sixth innings — in his fourth start after missing a month with left hip inflammation. Since returning, the 27-year-old is 3-0 with a 3.00 ERA.

"He kept his pitch count down and that allowed him to get a little deeper," manager Don Mattingly said. "It seemed as the game went on, he just got sharper and sharper."

The hardest hit balls off Smith were A.J. Reed's lined single in the seventh and Ryan Goins' fly to the wall in left that Granderson hauled in with a jumping catch to end the inning.

Chicago's Tim Anderson and Eloy Jiménez are out with injuries, and All-Star catcher James McCann didn't start.

Covey allowed five runs and six hits through six innings in his second start and fourth appearance since coming of the injured list with right shoulder inflammation.

"I felt really good, probably the best I've felt all year," Covey said. "Just a couple pitches, not bad pitches, they just got barrel to them, on both those home runs. If I can feel how I felt today rest of the year, I think I'll be just fine."

Covey set down nine of his first 10 hitters before Miami jumped ahead 4-0 in the fourth. Brian Anderson led off with a double and scored on Neil Walker's single. Walker came home when Starlin Castro lined a double to the left field corner. Granderson's high drive into the right field bullpen made it 4-0.

Ramirez lined his shot with one out in the fifth into the bullpen for a 5-0 Miami lead.

Relievers Nick Anderson and Jarlin García each tossed a perfect inning to close it out.

PERFECT 10

Tuesday was the 10th anniversary of former Buehrle's perfect game against Tampa Bay. White Sox manager Rick Renteria confessed he was getting a little spooked as Smith kept setting down his hitters

"I'll be honest, it was a little eerie for us because I kept thinking, 'I wasn't here 10 years ago,'" Renteria said. "Fortunately these guys worked a couple of walks and we were able to put a point across the board, but tip your cap to the kid, he threw the ball very well."

Buehrle tossed another no-hitter on the South Side in April 2007 versus Texas.

TRAINER'S ROOM

Marlins: INF Miguel Rojas (strained right shoulder) was held out of the lineup again Tuesday but took ground balls at shortstop before the game and threw across the diamond.

White Sox: Anderson (right high ankle sprain) will begin a rehab assignment at Triple-A Charlotte on Wednesday. Renteria didn't have a timetable for Anderson's return. The 26-year-old was enjoying a breakout season (.317, 11 HRs and 37 RBIs) before getting hurt on June 25.

UP NEXT

Marlins rookie RHP Zac Gallen (0-2, 3.63) takes the mound against White Sox RHP Reynaldo Lopez (5-8, 5.76) in the series finale Wednesday. Gallen will make his sixth start after joining Miami's rotation on June 20. Lopez is coming off two consecutive solid starts, allowing two earned runs over 13 innings, in an inconsistent season.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports