MIAMI -- Don Mattingly says he's glad to be returning next year as the Miami Marlins manager to provide stability for a struggling franchise, because as a player he experienced the other extreme.
Mattingly played for the New York Yankees from 1982 to 1995, when they made 12 managerial changes.
"I played for Billy Martin three different times," Mattingly said. "I played for Lou Piniella two different times. There was Stump Merrill, Dallas Green, one guy to the next, year after year. As a player you got the point where if things were going bad you're thinking, 'This guy is probably not going to be back."
The 58-year-old Mattingly will be back for a fifth season with Miami in 2020. His contract announced Friday is for two years plus a mutual option for 2022.
The Marlins also announced a two-year contract with shortstop Miguel Rojas that includes an option for 2022.
Mattingly's contract had been set to expire after this season, his fourth in Miami. CEO Derek Jeter, another former Yankee, said Mattingly remains the right person for the job even though the Marlins went into the weekend with 99 losses as they stagger to the end of their 10th consecutive losing season.
The rebuilding project that began when Jeter's group bought the franchise two years ago left Mattingly with an unimposing roster while the Marlins revive their farm system.
"When I think about who we want to lead this team moving forward, Don Mattingly is the right person," Jeter said. "He and I have had many conversations over the last couple of years where we've shared our frustrations about what's been going on on the field. But Donnie believes in our vision, he believes in our direction and he's all in. He has showed a lot of patience with our young, developing team. He understands what we're building here."
The Marlins haven't been to the playoffs since 2003 and may still be at least a couple of years away from contending. But depth in young pitching leave Jeter and Mattingly optimistic about improvement next season.
"I'm thrilled to have the opportunity to see this through," Mattingly said. "I see the talent coming. Hopefully by the time I'm done, this place is in a great spot and winning every year."
Mattingly's record with the Marlins is 272-364 (.428). Before he came to Miami prior to the 2016 season, the Marlins had seven managers in a six-year span, and he'll be the first to start a fifth season with the team.
With a 272-364 record, he has managed the most games in team history, and his win total ranks third in franchise history behind Jack McKeon (281) and Fredi Gonzalez (276).
Overall, Mattingly will enter his 10th season as a major league manager in 2020. He previously led the Los Angeles Dodgers from 2011 to 2015, and his 550 career wins rank fifth among active managers since 2013.
Rojas, who has been with the Marlins since 2015, is hitting .285 with five home runs and 45 RBIs this season. The 30-year-old shortstop missed 23 games in August after suffering a strained hamstring.
Under Jeter, the Marlins have been in rebuilding mode, trading away key pieces in recent seasons such as Christian Yelich, Giancarlo Stanton, J.T. Realmuto and Marcell Ozuna. They are an NL-worst 53-99 this season.
The Associated Press contributed to this report.