Rookie right-hander Michael Pineda has been one of the few bright spots in a season of disappointments for the Seattle Mariners.

Pineda pitched six strong innings before Seattle's bullpen wasted a late three-run lead as the Texas Rangers rallied for a 7-6 victory on Tuesday night.

Pineda allowed three runs and five hits and seemed to be on track to win his 10th game in 105-degree heat before the bullpen faltered.

He hadn't started since July 30 as the Mariners try to limit his innings, and he said his arm felt great after finishing with four strikeouts and two walks.

"I felt strong today," Pineda said. "The weather is very hot and I like that. I get loose fast."

What especially impressed manager Eric Wedge was that Pineda was able to settle down and shut out the Rangers on one hit in his final four innings.

"These are the so-called dog days," Wedge said. "In this type of heat he was able to settle himself down and give us a chance to win the ballgame. He did a great job those last four innings."

Josh Hamilton drove in the winning run with a single in the ninth inning, and Ian Kinsler and Endy Chavez homered for the Rangers.

Jeff Gray (0-1) walked Kinsler leading off the ninth. Aaron Laffey relieved and Chavez reached on a bunt single that sent Kinsler to second.

Hamilton followed with a single to left, and Kinsler scored easily from second ahead of a short throw from left fielder Trayvon Robinson before being mobbed by teammates who began running onto the field immediately after Hamilton made contact.

The Mariners took a 6-5 lead into the eighth, but Gray couldn't hold it.

Kinsler's two-run homer in the seventh off Josh Lueke had pulled Texas to 6-5, and Gray got himself in trouble when he walked Nelson Cruz with one out in the eighth.

Cruz was picked off first, but he'd already taken off and slid safely into second ahead of first baseman Mike Carp's throw for a stolen base. Cruz scored when Yorvit Torrealba doubled over the head of right fielder Ichiro Suzuki to tie it.

Walks in the eighth and ninth came back to haunt the Mariners, both leading to runs.

"That's what killed us," Wedge said. "You can't give a team like that free passes. They have too many good hitters and do a good job in scoring position."

Neftali Feliz (2-3) pitched the ninth for the victory.

Adam Kennedy drove in three runs for the Mariners, who started the night with a major league-worst team batting average of .228, having scored three runs or less in 18 of its previous 28 games.

Seattle has lost 23 of 30 after being in the division race heading into the All-Star break. Now they're 16 games behind the Rangers in the AL West.

"Nobody's comfortable with a three-run lead against those guys, here," Mariners shortstop Jack Wilson said. "You can't keep those guys down for very long."

The Mariners broke out against Rangers starter Alexi Ogando for six runs and eight hits in 2 2-3 innings, his second-shortest outing of the season behind 1 2-3 innings in a 12-4 road loss to the Yankees on June 14.

The Rangers reinstated the right-hander from the paternity leave list before the game and placed utility infielder Andres Blanco on the 15-day disabled list with lower back inflammation.

Seattle took a 2-0 lead in the first on Carp's RBI groundout and Kennedy's run-scoring single.

In the bottom of the first, Chavez hit his fifth homer of the season with the bases empty, and Michael Young added an RBI double off the wall in center.

Seattle grabbed a 3-2 lead in the second when Miguel Olivo scored from third on Kyle Seager's double-play grounder, but Chavez's RBI single in the bottom of the second drew Texas even at 3.

The Mariners went back in front with a three-run third on Kennedy's two-run triple into the right field corner and Olivo's sacrifice fly.

NOTES: Seattle 1B Justin Smoak sat out his sixth straight game with a left thumb injury. Smoak is eager to get back in the lineup, and Wedge said he expects Smoak to be available by Friday. ... Mariners LHP Jason Vargas will try to get his season back on track in Wednesday night's start against Texas. Vargas is 0-5 with a 5.57 ERA in his last five starts. LHP Derek Holland will start for Texas, trying to recover from his last outing when he lasted only 1 2-3 innings (allowing six runs and five hits) in a no-decision against Cleveland last Friday.