SURPRISE, Ariz. -- The Giants snapped the Rangers' five-game winning streak with a 2-1 victory at Surprise Stadium on Monday afternoon. The Giants have won two straight after snapping a four-game losing streak.

Giants starter Madison Bumgarner retired 12 of 15 batters in four scoreless innings. Bumgarner, who threw 64 pitches, allowed a hit and walk while a third batter reached base on an error. He struck out four and now has a 1.86 ERA on the spring while opponents are hitting .214 off him.

"It's getting time now when you want to start being game-ready instead of working on certain things," Bumgarner said. "You've got to be on your game facing a lineup like that. I know it's spring for them, too, but they can swing the bat.

Rangers starter Yu Darvish went 3 2/3 innings, allowing one run on five hits. He did not walk a batter and struck out five. He was pulled with two outs in the fourth having thrown 64 pitches as well.

"Overall today I thought was a good outing," Darvish said.

The Giants got their only run off Darvish in the third after Kensuke Tanaka reached on a one-out infield single, stole second and went to third on a two-out infield single by Tony Abreu. Hunter Pence followed with a double to left to drive home the run.

Rangers closer Joe Nathan pitched the fifth and gave up back-to-back triples to Abreu and Pence to bring home another run.

The Rangers picked up their only run when Mitch Moreland led off the fifth with a double off reliever Chad Gaudin and scored on grounders by Craig Gentry and Mike Olt.

Up next: Right-hander Tim Lincecum, having treated the blister on the middle finger of his throwing hand, will start Tuesday night against the San Diego Padres. Lincecum yielded three runs and four hits in 1 1/3 innings in his lone Cactus League outing on Feb. 26 against the Dodgers before the blister forced him to temper his workload. The two-time Cy Young Award winner, who has a history of blister problems, was pronounced fit to pitch after a series of bullpen sessions and a simulated game last Saturday.