DENVER -

Jordan Lyles is beating the odds. The Colorado Rockies right-hander is turning his career around while pitching at Coors Field.

Lyles worked into the ninth inning Monday, the longest outing by a Rockies starter this season, and Colorado beat the Texas Rangers 8-2.

Rockies third baseman Nolan Arenado hit a two-run homer to extend his hitting streak to 25 games, two short of the club record Michael Cuddyer set last year, and shortstop Troy Tulowitzki hit two two-run shots.

Lyles left after giving up a leadoff single to third baseman Adrian Beltre on his 104th pitch. Beltre ended up scoring with Nick Masset on the mound during his Rockies debut.

Lyles (4-0) said manager Walt Weiss told him if anyone reached base in the ninth, Masset would come in to get work.

Lyles, who has a 2.62 ERA, pitched into the ninth for the third time in his career, including one complete game in 2012. He joined Mike Hampton as the second pitcher in Rockies history to win four or more games with no losses in the team's first 34 games of a season. Hampton began 5-0 in 2001.

"The biggest thing is making better pitches when guys are in scoring position," said Lyles, who held the Rangers hitless in three such at-bats, each time ending an inning. "I don't know the numbers, but I can figure I wasn't too good in the past. That's the biggest key."

The Rockies acquired Lyles and outfielder Brandon Barnes in a December trade that sent center fielder Dexter Fowler to Houston. Lyles went 7-9 with a 5.59 ERA last year for the Astros, and he left there with a career record of 14-29 and a 5.35 ERA in 72 games, including 65 starts.

He induced 15 groundouts Monday.

"He moved his fastball around," Rangers manager Ron Washington said. "He had a good cutter working tonight. He threw a slider, and he got ahead of the hitters. When he was ahead of the hitters, he was able to put them away."

While with the Astros, Lyles made six starts against the Rangers, more than against any other club, and went 0-5 with a 9.82 ERA.

"Just making better pitches, I guess," Lyles said of his about-face against Texas. "Guys hit it on the ground. I'm with a different team, so many different scenarios as to why I didn't have success against them. They're a good team, a good lineup, it's a hitter's park, but we kept them at bay and shut the door in the sixth when they had a chance to get back in the game."

The Rangers scored in that inning to make it 5-1.

Shin-Soo Choo led off with a double and took third when center fielder Drew Stubbs overran the ball. Choo scored on Carlos Gonzalez's groundout. After Beltre singled, Fielder grounded to Tulowitzki, who was shifted to the right side of second and ran to the base to start a double play.

Arenado's homer ended the streak of 46 consecutive homerless innings, including 43 2/3 this year, by Rangers starter Martin Perez. The left-hander threw a four-seam fastball well inside that Arenado still managed to drive down the left field line for his sixth homer of the season.

"He got his hands in on it well," Washington said. "He got through that baseball. You got to give him credit for getting there. Not that it's a bad pitch -- he could've very easily pulled that pitch foul."

Catcher Robinson Chirinos said, "It was stupid. He hit that ball that far inside and hit it outside the park. You can't do anything, just laugh, you know. It was a good pitch."

Perez gave up a two-run homer in the fifth to Tulowitzki, who connected on a changeup that Perez was trying to throw down but was up and away. Tulowitzki managed to hit it just inside the right field foul pole.

Perez lasted five innings and allowed seven hits and five runs in his second successive spotty start. He gave up eight hits and eight runs in 4 2/3 innings on April 29 against the Oakland A's after compiling a scoreless streak of 26 innings.

Asked if he thought Perez rebounded well from his outing against the A's, Washington said, "He did. You got to understand where we are. The kid is going to have 30-something starts. He's going to have some starts that just don't go in his favor. But he's healthy, so got to keep running him out there."

Tulowitzki added his second two-run shot in the seventh off right-hander Shawn Tolleson.

NOTES: The Rockies selected the contract of RHP Nick Masset from Colorado Springs and optioned INF Ryan Wheeler to the Triple-A club. To make room on the 40-man roster for Masset, RHP Tyler Chatwood (right flexor tendon strain) was moved to the 60-day disabled list. ... Colorado SS Troy Tulowitzki was selected the National League Player of the Month for April and the National League Player of the Week for April 28-May 4. ... The Rockies had a call overturned in their favor in the second inning. Texas 3B Adrian Beltre's throw pulled 1B Prince Fielder off the base. Fielder tagged 2B DJ LeMahieu on the back but then dropped the ball. LeMahieu initially was called out, but a 1-minute, 44-second review determined Fielder did not have complete possession of the ball.