The team announced Pettitte’s decision in a news release Friday, hours before opening its final homestand. The 41-year-old left-hander initially retired after the 2010 season, but he sat out only one year before returning to the Yankees.

“I’ve reached the point where I know that I’ve left everything I have out there on that field,” Pettitte said in the statement. “The time is right. I’ve exhausted myself, mentally and physically, and that’s exactly how I want to leave this game.”

In a nice bit of symmetry, Pettitte is scheduled to make two more starts this season — one at Yankee Stadium and the other in his hometown of Houston.

“One of the things I struggled with in making this announcement now was doing anything to take away from Mariano’s day on Sunday,” Pettitte said. “It is his day. He means so much to me, and has meant so much to my career that I would just hate to somehow take the attention away from him.”

Rivera has saved 72 of Pettitte’s 255 career wins, the most for any set of teammates in major league history.

A three-time All-Star, Pettitte has helped New York to seven AL pennants and five World Series championships during 15 seasons in pinstripes. He was the MVP of the 2001 AL championship series and is the franchise leader in career strikeouts with 2,009.

He joined old buddies Rivera, Derek Jeter and Jorge Posada to make up the “Core Four” that has led the Yankees to more than a decade and a half of sustained success.

Jeter, limited by injuries to just 17 games this season, will be the only one left next year.

“I’m announcing my retirement prior to the conclusion of our season because I want all of our fans to know now — while I’m still wearing this uniform — how grateful I am for their support throughout my career,” Pettitte said. “I want to have the opportunity to tip my cap to them during these remaining days and thank them for making my time here with the Yankees so special.”

Pettitte is 10-10 with a 3.93 ERA in 28 starts this season. After a rough patch, he has pitched particularly well down the stretch with New York desperately chasing a playoff berth.

His final start is scheduled for next weekend against Houston, the only team Pettitte has played for besides the Yankees. He spent 2004-06 with the Astros, teaming with Roger Clemens to help the club make its only trip to the World Series in 2005.

Selected by the Yankees in the 22nd round of the 1990 draft, Pettitte is 255-152 with a 3.86 ERA in 18 big league seasons. That makes him one of 26 pitchers — the only one still active — with a record at least 100 games over .500.

Eighteen of those pitchers are in the Hall of Fame.

Pettitte is 19-11 with a 3.81 ERA in the postseason, giving him more postseason wins than eight major league teams. He also ranks first in postseason innings (276 2-3) and second in strikeouts (183).

In 2009 with the Yankees, he became the first pitcher to start and win the clinching game of all three series in one postseason.

Petite’s teammate Mariano Rivera is also on the road to retirement. He will be honored with festivities at Yankee Stadium prior to Sunday’s game.