The lights went out on Ian Kennedy on Tuesday night. It's been that kind of a month.

"That was something different," Kennedy said after a 5-2 loss to the Tampa Bay Rays dropped him to 0-4 in six July starts. "Add it to the list of new things that happen to you every time you go out there."

The lights — just a few of them, actually — went out in the stadium for about 20 minutes in the second inning, the result of a lightning strike at a nearby power substation.

At the time of the delay, the Diamondbacks were already two runs behind against the hottest team in baseball.

"It had no effect on the game. We both had the delay," said Arizona manager Kirk Gibson. "You've got to get people out. We walked four out of the bullpen. We walked seven on the night. We were behind a lot of guys, and it's pretty hard to pitch against a team playing like that. Overall, it was not a very good effort tonight."

It was the third straight loss for the Diamondbacks, who didn't score until Eric Chavez's two-run home run off Roberto Hernandez with two out in the ninth. It was Kennedy's 10th unsuccessful attempt to earn his 50th career victory. He is 0-5 in 10 starts since his last victory on June 1, and Kennedy acknowledged that recent trade rumors have not helped.

"It's hard to ignore," he said. "You walk into this clubhouse, the first thing that was said to me is not something you want to think about when you're going out there to pitch. ... It was good natured, but it's not something you want to hear when it's your start day."

Yunel Escobar and Ben Zobrist drove in two runs each for the Rays, who have won 21 of 25 games this month. With one game remaining, it stands as the best July record since the Yankees went 25-4 in 1941, the month Joe Dimaggio's 56-game hitting streak came to an end.

Hernandez (6-11) opened the game by hitting Gerardo Parra with a pitch, then giving up a single to Aaron Hill. The veteran right-hander retired 22 of the next 25 batters he faced before Parra singled leading off the ninth, and Chavez ended his shutout bid.

Hernandez struck out six and walked one in his first complete game of the season, and Tampa Bay's seventh complete game of the month.

"He kept the ball down. We hit a ton of groundballs on him," Gibson said. "We hit into two double plays. We had some action going on, but the offense was stagnant again tonight. It wasn't a surprise. He had a good idea of how he was going to approach us . . . but he threw a good game. We were just unable to capitalize on anything at all."

Zobrist and James Loney drove in runs in the first inning, and Escobar made it 3-0 with his eighth home run in the fourth inning.

Kennedy gave up six hits and three runs while striking out seven in five innings.

Hill had two of Arizona's hits, but was doubled up after each of them.

"The offense is not clicking at all, so we'll switch our lineup a little bit more tomorrow and try to get some guys in that maybe can get something going," Gibson said.

NOTES: Rays RHP Alex Cobb threw 50 pitches in a simulated game Tuesday and is scheduled to pitch three innings Saturday for Port Charlotte (Class A Florida State League) in a rehab start. Cobb has not pitched for the Rays since sustaining a concussion on a line drive June 15. ... Hill is 19-for-44 (.442) in his last 12 interleague games. ... Rays rookie Wil Myers stretched his hitting streak to 11 games with third-inning single. ... This is only the Diamondbacks' third visit to Tampa Bay. Ed Jackson no-hit the Rays in Arizona's last visit here in 2010.