Andy Pettitte's brilliant career ended with a storybook finish.

The retiring left-hander hurled a complete game in his hometown of Houston, leading the New York Yankees to a 2-1 triumph over the Astros in his final appearance on a major league mound.

Pettitte (11-11), who was raised in nearby Deer Park, TX and spent three of his 18 seasons with the Astros, yielded just five hits and two walks while striking out five to earn the 256th win of his career. The 114-pitch effort came with a throng of family and friends cheering the 41-year-old on at Minute Maid Park.

The complete game was Pettitte's first since Aug. 16, 2006, his last season with the Astros, and ensured that none of his 18 years in the big leagues ended with a losing record.

"It was almost a fairytale," Pettitte said. "I'm thankful and fortunate and blessed. It's another day I'll never forget."

New York gave Pettitte all the support he needed with a two-run sixth inning, with the deciding tally coming on a throwing error by Houston catcher Matt Pagnozzi. Robinson Cano had an RBI single earlier in the frame and finished 2- for-4.

While Pettitte went out a winner, the Astros had their franchise-record losing streak extended to 14 games and made them only the third team since 1970 to drop 110 games in a single campaign.

Paul Clemens (4-7) was saddled with the setback after permitting two runs -- one earned -- over 5 1/3 innings. Jose Altuve finished 2-for-4 and scored Houston's lone run.

Pettitte held the Astros scoreless over the first three innings of play, getting help by a pair of double plays turned by the Yankees' defense. He was touched for a run in the fourth, however, the result of some heads-up baserunning from Altuve.

The Houston second baseman led off the bottom of the inning with a single and moved to second on a groundout. Chris Carter followed with a ground ball to short in which he was also thrown out, but Altuve hustled around and was able to cross the plate with the game's initial run.

Clemens, meanwhile, was making a bid to spoil Pettitte's farewell after the rookie fired five scoreless frames and entered the sixth having retired 10 straight batters. That streak ended when Chris Stewart opened with a single before Eduardo Nunez delivered a base hit two batters later to put men on the corners with one out.

Cano then singled through the right side to tie the game and chase Clemens. After Chia-Jen Lo walked Alfonso Soriano to load the bases, the reliever's pitch to Zoilo Almonte struck the backstop and caromed right to Pagnozzi, who threw low to the plate as Nunez slid home with the go-ahead run.

Pettitte took it from there. The veteran walked Jonathan Villar to start the bottom of the sixth, then set down the next 11 hitters until Carter kept Houston's hopes alive with a two-out single in the ninth. Yankees manager Joe Girardi went to the mound to check on his pitcher, who successfully lobbied to stay in before finishing off his 26th career complete game by getting J.D. Martinez to ground out.

Pettitte was promptly mobbed by his teammates and congratulated one-by-one, then walked around the infield and tipped his cap to the Houston fans as Astros players came out of the dugout to give him a standing ovation.

Game Notes

Pettitte's start was his 438th as a Yankee, tying Hall of Famer Whitey Ford for the most in club history ... Prior to the game, Yankees closer Mariano Rivera announced he will not pitch in this series. The retiring 13-time All- Star stated he wanted his final appearance to be Thursday's 1 1/3-inning stint against Tampa Bay at Yankee Stadium ... New York improved its MLB-best record in one-run games to 30-16 ... The 2004 Arizona Diamondbacks (111) were the last team to lose at least 110 times in a season ... The Yankees will send out David Huff in Sunday's season finale opposite Erik Bedard.