FINISHING THE JOB: Phil Hughes is congratulated by Russell Martin after allowing four hits and a run in his first career complete game. Photo: Getty Images

FINISHING THE JOB: Phil Hughes is congratulated by Russell Martin after allowing four hits and a run in his first career complete game. (Getty Images)

DETROIT — Andy Pettitte wasn’t always the gray-haired lefty who tries to fight through seven or eight innings, which he has admitted to being since coming out of retirement.

He used to be a 23-year-old rookie, capable of finishing a game every time he took the mound — and he’d like Phil Hughes to become the same thing, which is why he approached Hughes in the dugout after the eighth inning of yesterday’s 5-1 win over the Tigers.

“I just said, ‘Let’s finish this thing off,’ ” Pettitte said after Hughes tossed the first nine-inning complete game of his career. “And he got through it. It’s a big step.”

Hughes has been inconsistent this season, as his 5-5 record indicates. After four straight solid starts, he was battered around for seven runs in his previous outing — a loss in Anaheim.

“I could have let that outing in Anaheim snowball into a few rough outings in a row,” Hughes said. “It was good not to let things continue to slide downhill. But it’s one start. I have to build off this one.”

Hughes beat Justin Verlander, who has now lost three straight starts for the first time in nearly two years, as the Yankees completed a 6-3 road trip.

The right-hander has been hurt by inefficiency in almost all of his outings this season, but yesterday, he was good enough to let Joe Girardi allow him to finish the game.

The manager didn’t hesitate to send Hughes out for the ninth, even with the heart of Detroit’s order coming up and his pitch count up to 107.

He retired Miguel Cabrera and Prince Fielder before Delmon Young singled and a fan ran onto the field. After the delay, Girardi visited Hughes and told him Brennan Boesch would be his last batter.

Hughes responded by striking out the right fielder on his 123rd pitch.

“I thought his stuff was probably as good as we’ve seen it all year long,” Girardi said of Hughes’ performance, in which he gave up four hits, three walks and a home run to Prince Fielder.

He was able to locate his fastball after leaving it over the plate too often against the Angels, something Russell Martin noticed right away.

“He spotted his fastball and had a better curveball,” the catcher said. “Just those two pitches combined are good enough to get through any lineup.”

And the Yankees’ bats, which have been quiet lately, scored five runs against Verlander (5-4), who was also hurt by a passed ball and an error. Derek Jeter led off with a first-pitch homer and the Yankees scored a second first-inning run on a sacrifice fly set up by a passed ball.

Still, despite also getting a long home run from Alex Rodriguez, the offense only had one hit in 11 at-bats with runners in scoring position.

Hughes made that problem seem irrelevant, tossing the first complete game of the season for the Yankees.

“I was able to put out any little fires,” said Hughes, who didn’t allow more than one base-runner in any inning. “I was able to keep my pitch-count down. … I was able to go out and do what CC [Sabathia] does. It’s a good feeling.”

Now, the 25-year-old has to show he can be relied upon every start. Yesterday’s performance will help, according to Pettitte.

“I think it’s important,” Pettitte said. “It’s a little hurdle to get over five or six innings, but late in games, when you get tired, you have to dig deeper. The fact that he did it showed me something. You could tell he was excited about it.”