Bob Melvin is staying put to manage in his native Bay Area and considers it the perfect fit.

The feeling is mutual for the Oakland Athletics, who announced Wednesday they had reached agreement on a three-year contract to keep Melvin as their permanent manager.

"I've been taken care of very well here," Melvin said. "(General manager) Billy (Beane) has treated me beautifully, the front office has, the players have, the support staff . . . they've all made me feel like I'm at home. So I feel like this is a good spot for me."

The 49-year-old Melvin took over in an interim capacity for the fired Bob Geren in June and has a 42-49 record after Tuesday night's 7-2 loss to the AL West-leading Texas Rangers at the Coliseum. Geren's dismissal marked the first time Oakland fired a manager during the season in a quarter century.

Melvin, a Bay Area native who played college baseball at California, previously managed the Seattle Mariners and Arizona Diamondbacks.