DETROIT -- Jim Leyland's future will remain in a Tiger uniform. The team and the manager agreed Friday to a two-year contract extension, ending speculation while rewarding the veteran skipper for a first-place start with a team that has had no shortage of challenges.

The deal was quickly negotiated and finalized Friday morning between Leyland and team president/general manager Dave Dombrowski in Leyland's office. It was arguably fitting, given the way the Tigers have had to react to one situation after another to keep the team headed in the right direction.

"It's extremely well-deserved," Dombrowski said in making the announcement. "He's done a tremendous job for our organization since he's been here. He's done a great job this year keeping our club in first place and continuing to work hard along with his staff. It's a happy day to be able to make this announcement."

It was not a day that Leyland was expecting quite so soon.

"This was a total shock," Leyland said. "I kind of assumed this was going to be at the end of the year and [the team would] evaluate and it would be yes or no."

The Tigers entered Friday with a 35-31 record, two games ahead of the second-place Minnesota Twins in the American League Central. They've sat atop the division since mid-April despite an offense that has yet to find its power from last year, especially from former batting champion Magglio Ordonez, and a list of injuries that includes starters Jeremy Bonderman and Dontrelle Willis along with left fielder Carlos Guillen.

Detroit has had contributions from such varied sources as Clete Thomas, who stepped up from Triple-A Toledo into a regular outfield role before slumping, and Josh Anderson, who provided a jolt of speed after the Tigers traded for him in the final days of Spring Training.

Curtis Granderson has gone from batting leadoff to batting fifth and led the team in home runs entering Friday, while 20-year-old rookie Rick Porcello led the team in victories. Fernando Rodney was 13-for-13 in save opportunities despite his usual erratic bouts, heading up a bullpen that as a group has outperformed individual expectations.

"He's worked as hard as ever," Dombrowski said. "He always has had, and continues to have, that fire that burns, and I've always maintained that if Jim has that burning fire, he's as good as any manager in the game. He's tackled every issue that comes up. We continue to play hard day in and day out. He has the players' respect. He always puts you in a position to win, whatever's necessary.

"We've had some ups and we've had some downs as a ballclub, but we've come to play, every single day. We're sitting in first place in the middle of June. I think all in all, everybody's done a tremendous job in keeping us here, and he's responsible for that."

All that has come against the larger issue of a city and a state with some of the worst economic struggles in the nation. Those troubles are reflected in an attendance drop at Comerica Park, where the Tigers have been mindful of trying to earn the fans' ticket.

This season's solid start stands in stark contrast to last year, when the Tigers struggled to handle the lofty expectations that came with trades to bring in Miguel Cabrera, Willis and Edgar Renteria. Detroit lost its first seven games and never saw first place, despite briefly crossing the .500 mark in June. A September swoon dropped the Tigers into the division cellar at 74-88, the first time they'd finished last since 2005.

On the heels of that disappointment, the Tigers decided not to extend Leyland's contract, which was set to expire at the end of this season. Leyland said openly that he hoped to manage for several years beyond.

He essentially went into the year managing for a contract, but he insisted it would not be a distraction. He consistently declined to discuss his contract since the Winter Meetings, even though his situation became a hotter topic as the Tigers picked up their winning pace last month.

"I think everybody on this team, hands down, would back him as their guy," Granderson said earlier this week.

Leyland, in turn, put credit on the players.

"This comes from a lot of hard work by the players, by the coaches," Leyland said. "This is kind of a personal reward in some ways, but it's really a team reward. I hope that the players are very happy about it."