FORT WORTH, Texas -- Three weeks ago, Mark Martin thought his stellar Sprint Cup career might be ending at age 52.
Not quite yet.
As expected, Michael Waltrip Racing announced Friday it has signed Martin to drive the No. 00 Toyota for 2012 and 2013.
"Michael Waltrip Racing is making a serious move to step up its program on the competition side, and I'm excited to be a part of that," Martin said Friday. "At a time when other NASCAR teams are cutting back and staying the same, Michael's team is adding people and sponsors."
Martin will run a 25-race schedule each of the next two seasons, starting with the 2012 Daytona 500. Waltrip will drive the car in five races the next two years.
"It is the perfect schedule for me,'' Martin said. "It enables me to catch my breath and spend more time with the fans."
Aaron's will continue to sponsor the car for those 30 races each year. Waltrip said MWR is looking for sponsorship for the other six races in 2012 and 2013. He doesn't know who will drive the car in those events.
Both Waltrip and Martin said the entire deal to sign him came together in the last three weeks. It started when Aaron's CEO Ken Butler talked to Waltrip about plans for the future.
"The thinking in our camp was, 'What's next?' " Butler said. "I went to Michael and said, 'What can we do next?' We started thinking outside the box. I said, 'What about that Mark Martin guy?' And here he is. I couldn't be happier."
David Reutimann has driven the car the last five seasons, but MWR announced Thursday they were parting ways. Reutimann, 41, is 28th in the Cup standings this season with no victories and only two top-10 finishes.
Martin, who is in his final season as the driver of the No. 5 Chevrolet for Hendrick Motorsports, is 20th in the 2011 standings with no wins and 10 top 10s. But Martin has 40 career victories and is a five-time runner-up to the Cup championship, including 2009.
"We have signed a future Hall-of-Famer,'' Waltrip said. "This is a big day for MWR and Aaron's. We have performed well this season, but haven't finished well. We felt things were not going the way we hoped it would. So I couldn't be happier and prouder."
Three weeks ago, MWR also signed Clint Bowyer to drive for the team next season with 5-Hour Energy Drink as the sponsor.
"This organization now will have two of the best young drivers in Cup with Bowyer and Martin Truex Jr.," Martin said. "I can't wait to work with those guys.
"And I'm joining a marketing partner [Aaron's] that is second to none in motorsports. I know we're going to have a whole lot of fun. Hopefully we'll find a way to make fun of myself [in commercials]. I think we have some good ideas already."
Terry Blount is a senior writer for ESPN.com.