Not so long ago, Kevin Towers and Bruce Bochy were working together to build a winner in San Diego.

Now, Towers is the first-year general manager of the Arizona Diamondbacks and trying mightily to dethrone Bochy and the defending World Series champion San Francisco Giants.

"I want to somehow be ahead of Boch," Towers said with a chuckle during his team's recent visit to AT&T Park. "I don't like being on his bumper."

These two clubs could very well go back and forth the rest of the way.

The D-backs led the NL West on Thursday for the first time since June 24, on top in a year when many hardly considered them contenders. Even Towers himself acknowledged at the start of spring training his team would have to surprise with pitching in a division dominated by talented arms or Arizona would fall out of the running in a hurry.

Bochy's Giants are in their worst funk of the year, and Arizona would like nothing more than to take advantage.

Who would have thought the West would turn into a two-team race in early August?

"We'll bounce back. We've got a lot of heart and a lot of fight in our team," San Francisco's Cody Ross said. "Nobody in here has forgotten that. Other people might have but we don't."

The idle Giants (64-54) dropped a game behind Arizona after the Diamondbacks rallied to beat Houston 8-5 in 10 innings Thursday night. San Francisco, having lost 10 of 13 after a 3-7 homestand, traveled to Florida to kick off a 10-game road trip Friday night.

These D-backs sure seem to have legitimate staying power.

"No question they deserve to be in the position they are. We really take them very seriously," Giants GM Brian Sabean said. "They've done a nice job all around. They're a well-rounded team, especially now."

Towers acquired pitchers Jason Marquis and Brad Ziegler at last month's trade deadline to bolster an already reliable staff. Whether that's enough when it comes down to it, he's not sure.

"We'll see," Towers said. "I knew we'd have a chance (if we pitched)."

This division could go down to the wire again. Everybody involved expects it.

Colorado can't be counted out, but the third-place Rockies have had a rough go. The bankrupt Dodgers have endured a drama-filled year after Major League Baseball assumed control of the club's operations in mid-April. And the last-place Padres are a far cry from the team that was eliminated from playoff contention in San Francisco on the season's final day last fall — no longer the challenger they were under the guidance of Towers and Bochy back in the day.

The Giants clinched their first division title since 2003 last year in Bochy's fourth year as manager to end a six-year playoff drought, then went on to capture an improbable World Series title.

They came through their problems last August, so many still figure it's the Giants division to lose.

"The Dodgers are having troubles," said Phillies manager Charlie Manuel, eliminated by San Francisco in a six-game NL championship series last October. "At the beginning of the season I thought Colorado would be a little bit better than they are right now. Some years that's just kind of the way it goes. San Diego, with their pitching, I thought they'd be better, too. But Arizona just came from nowhere. They found pitching. They just worked with their own and developed it. You can go a long way sometimes by wanting to play, when your guys love to play and they give it all they've got."

Arizona was swept in San Francisco from May 10-12, all three losses by one run. That weekend was tough to swallow, but also helped light a fire in Towers' team.

"I felt we were good back then but we were losing those games by one run," said 14-game winner Ian Kennedy, who takes the ball Friday to open a series with the Mets at Chase Field. "I think they put a great team together. There are some teams that are more talented, but we play well together. ...

"It's about talent and chemistry. Pitching has a lot to do with it. That's why we were out of it last year — our starters weren't very good and our bullpen wasn't very good," Kennedy said.

Kennedy grew up in Huntington Beach, Calif., watching the gritty Angels develop into a regular AL West contender. He sees similarities with this determined D-backs bunch.

At 65-53, Arizona has made huge strides since going 65-97 last season. Towers stripped the interim tag off manager Kirk Gibson's title, and Gibson has gone out of his way to be a hands-on presence for a young team.

He can be seen before games in the indoor cage right alongside his players, offering instruction and a supportive influence.

And Gibson is a big reason for the D-backs' surprising season. He preaches handling what is in his club's control, rather than trying to keep up with the others.

"We just come out and grind it out. We make sure we have 25 guys here and we try to push it as hard as we can," Gibson said. "When we get to the end of the season we'll see where we're at. The Giants are the Giants. They're the world champs. We understand that. We respect them. We take care of our business. We don't have to worry about anybody else. ... We just want to keep putting pressure on the people above us and enjoy playing the game the right way."

Sabean has had no choice but to be creative with his roster for the second straight season because of injuries to key players and just the process of trying to improve.

"Every year you're always tweaking things. In our case, we're a little more in need and anxious to do things for obvious reasons," he said.

The Giants lost reigning NL Rookie of the Year catcher Buster Posey to a season-ending broken leg after a May 25 home-plate collision with Florida's Scott Cousins. Second baseman Freddy Sanchez is sidelined for the rest of the year after labrum surgery on his right shoulder last week.

For Bochy, there has been constant shuffling to the lineup to deal with injuries — and slumps.

"We've got guys who have been around," he said. "They've got to figure it out."

Arizona is keeping pace so far.

"That's the beauty of a season. That's the beauty of the game of baseball," said Pirates manager Clint Hurdle, the former Rockies skipper. "The Diamondbacks have absolutely been a great story this year. And I know the Giants, how can you not feel confidence and strength from what they were able to accomplish last season going into this season?

"The Giants' re-emergence in the game of baseball and the National League is as good a story as anybody else's as well, because it's been a while. They're definitely a force."