NEW YORK -- The New York Yankees dynasty that produced 13 American League East titles and five world championships moved another step closer to its end when Andy Pettitte announced Friday that he would retire at the conclusion of the season.

The 41-year-old left-hander, a member of all five Yankees World Series-winning teams and the pitcher with the most postseason victories in baseball history, made the announcement at a dry-eyed, 25-minute news conference at Yankee Stadium.

"Mentally and physically, I'm just done," Pettitte said before Friday night's game against the San Francisco Giants. "I've pitched this season knowing this was going to be it.

"It was a long, hard year. I couldn't be happier with my decision. I've been retired, and I know what it's going to be like. It's awesome. It's great, and I'm looking forward to it."

Pettitte said he's known since the beginning of the season that this would be his last and told manager Joe Girardi around its halfway point. In the ensuing weeks, Pettitte informed some teammates of his plans, but he had not decided to announce his retirement during the season until having lunch with Mariano Rivera, who is also retiring at the end of the season, earlier this week in Toronto.

Pettitte, who will make his final Yankee Stadium start Sunday, said he feared that announcing his retirement plans would overshadow a pregame ceremony the Yankees will have to honor Rivera that day.

"He was just so supportive of it and told me I had to announce it and that I should," Pettitte said. "He thinks it's going to make the day even better. To hear him say that, and to feel that way about it, I feel like we're connected, you know, in a sense."

Pettitte, Rivera and Derek Jeter have been Yankees teammates since 1995, coming up through the organization's farm system together. Now, with Pettitte and Rivera about to retire and Jeter's future uncertain because of recurring problems related to the broken ankle he suffered in the 2012 AL Championship Series, Pettitte said he sensed that an era of Yankees baseball was ending.

"We've had a great run here," Pettitte said. "Part of me coming back was to try to do this run again with the group of guys that we had here, and it's starting to get toward the end of that. This group, we've kind of had our run here. But it just feels right, like my time here is done. My run is over."

Pettitte had retired after the 2010 season, but it turned out to be short-lived. After sitting out one year, Pettitte returned in 2012 and went 5-4 with a 2.87 ERA in a season shortened when he suffered a broken leg after being hit by a batted ball in his ninth start of the season.