Miguel Tejada drove in three runs and Jose Valverde shrugged off a bruised right heel to shut out the Dodgers in the ninth for his first save. Orlando Hudson hit a hard grounder into Valverde's heel and the closer limped around and took some warmup pitches before finishing the game.
"I'll take a win almost at any cost -- almost," manager Cecil Cooper said. "I think he'll be OK. That's a good thing."
Valverde could barely walk about 45 minutes after the game ended, hobbling into the clubhouse after getting treatment. The ball hit him near his ankle and Valverde said he strained his right calf when he went down to field Hudson's grounder.
Cooper and catcher Ivan Rodriguez tried to convince Valverde to come out of the game, but he refused.
"I wanted to pitch," he said. "I wanted to support my team, and that's what I did today."
"I thought we were going to come away with the win, but Valverde came in," center fielder Matt Kemp said. "I thought we had a chance, but he fell back and got the save."
Ortiz (1-0) gave up three runs in the first inning, then stifled the Dodgers for the next four while the Astros took over. Los Angeles came in with the highest batting average in the majors (.302) and an NL-leading 82 runs.
Manny Ramirez hit a two-run homer in the seventh inning for Los Angeles and drove in three to pass Honus Wagner for 18th on the career list. The dreadlocked slugger has 1,735 RBI.
The Dodgers seemed on their way to another big night when Ortiz walked the first two hitters and Ramirez blooped an RBI single into left to pass Wagner. Loney and Martin knocked in runs later in the inning for a 3-0 lead.
Ortiz threw 34 pitches in the first and knew he wasn't sharp.
"I just didn't find the right groove to be able to throw the ball consistently in the zone," he said. "I knew, after the first, my job was just to keep us in the game."
Lance Berkman had an RBI single in the bottom half and Houston added three more in the third against Clayton Kershaw (0-1). Tejada doubled in Kaz Matsui to cut the Dodgers' lead to 3-2. After Berkman flied out, Lee hit a drive off the brick facade in left for his third homer of the season.
Kemp tripled to center with one out in the fourth to extend his hitting streak to 14 games. But the Dodgers stranded him, failing to muster another hit off Ortiz in the inning.
"I kept plugging away and had to battle the best as I could to get through as many innings as I could," Ortiz said.
Rodriguez and Jeff Keppinger led off the Astros' fourth with singles and Ortiz advanced them with a bunt. Matsui popped out before Tejada blooped a two-run single to right for a 6-3 lead.
The Dodgers hadn't allowed more than five runs since their last loss, 9-4 to Arizona on April 10. Kershaw allowed six runs and eight hits before Guillermo Mota replaced him with one out in the fifth.
"He just didn't look comfortable," Dodgers manager Joe Torre said of Kershaw. "It looked like he tried to overthrow it, at times."
Ortiz, meanwhile, got better with each inning. He struck out Ramirez looking in the fifth, then got Loney on a groundout to wrap up his 116-pitch outing. Wesley Wright relieved in the sixth.
Mota issued a bases-loaded walk to Matsui in the sixth to make it 7-3 and Torre brought in right-hander Ramon Troncoso, who retired the next two batters.
Matsui added a sacrifice fly in the eighth for Houston.
- The Astros' run total was a season high.
- Torre said RHP Hiroki Kuroda would throw a bullpen session in the next day or two and could be ready to pitch by the end of April. Kuroda went on the disabled list on April 10 with an oblique muscle strain.
- Keppinger returned after missing the last four games with a lower back strain.
- Astros RHP Brian Moehler is due to make a rehab start for Triple-A Round Rock on Friday. Moehler went on the disabled list last Tuesday with a sprained right knee.