With a rookie-laden roster, Houston Astros manager Brad Mills is trying to focus on the positives.

"There were a lot of positives because of the hits and runs but they were able to dig back into the game and keep on scoring," Mills said after the Arizona Diamondbacks rallied from a six-run deficit to beat the Astros 11-9 on Tuesday night.

Houston pounded out 14 hits against four Arizona pitchers and saw two of its rookies, Brian Bogusevic and Jimmy Paredes, hit their first career home runs.

But the Astros also left 11 men on base and scored only two runs over the final five innings after chasing Diamondbacks starter Jason Marquis in four innings.

"We had some good at-bats even though we left some guys on," Mills said. "I know we kind of struggled and left a lot of guys on base tonight but we had some big nights from some guys."

The big nights weren't enough to overcome the struggles of starter Jordan Lyles and reliever Wilton Lopez (2-5).

The Diamondbacks scored eight runs in the fifth and sixth innings to overcome a 7-1 deficit, matching the largest rally in franchise history.

Gerardo Parra, Micah Owings and Willie Bloomquist led off the fifth with consecutive singles to load the bases against Jordan Lyles. One out later Justin Upton doubled off the wall in left, scoring Parra and Owings, and Montero followed with a two-run single to make it 7-5.

"I thought I threw the ball where I wanted to for the most part but they happened to hit it over a couple of guys' heads," Lyles said. "At the same time I can't give up a big lead like that making pitches or not. I can't let it happen."

Lyles allowed seven runs and 12 hits in five-plus innings, both career-highs. He struck out two.

Bloomquist tied the game in the sixth with a one-out, two-run single and Upton homered to give the Diamondbacks a 9-7 lead.

Paredes homered with two outs in the seventh to cut the lead to 9-8. Diamondbacks reliever David Hernandez let the first two batters reach and loaded the bases with two outs but escaped the jam.

Ryan Roberts and Kelly Johnson had RBI doubles in the eighth for Arizona.

Upton finished with three hits, including a double and a home run, and drove in four runs. Parra had his fourth career four-hit game and Miguel Montero doubled and had three RBIs and for the Diamondbacks.

Owings (6-0) threw three innings of two-hit relief and allowed one run for the victory. He struck out four and added a single. J.J. Putz allowed a run and three hits in the ninth for his 27th save.

Marquis struggled in his second straight start since being acquired by the Diamondbacks from Washington on July 30. He allowed seven runs — four earned — and nine hits with two walks and two strikeouts over four innings.

Upton singled and scored on a double by Montero to give the Diamondbacks a 1-0 lead in the first. Houston tied the game on the second on three singles, the last a run-scoring infield hit by Humberto Quintero.

The Astros added three in the third on J.D. Martinez's one-out homer, his second in as many nights, and Bogusevic's two-run homer.

Carlos Lee hit a two-run single in the fourth and Bogusevic doubled to left to extend Houston's lead to 7-1.

NOTES: Marquis has lost his last three starts including his final one for the Nationals on July 24 at Los Angeles. He has a 12.38 ERA in two starts for Arizona. The Diamondbacks play their next 15 games against non-division opponents. ... Diamondbacks RHP Josh Collmenter will be looking to end a two-game personal losing streak and win his second straight over the Astros on Wednesday night. Collmenter lasted just 2 1-3 innings in his last start Aug. 5 against Los Angeles, allowing six runs, eight hits and a walk, and has posted a 16.50 ERA in his past two starts.