DETROIT -- Alberto Gonzalez squared to bunt, hoping to drive in the go-ahead run on a squeeze play. The ball hit his bat and glanced off his right leg before bouncing off the ground and out toward the pitcher.

Then the Texas Rangers caught a break.

Instead of being called a foul ball, Gonzalez's bunt went for an RBI infield single in the 11th inning, lifting the Rangers to a 3-2 victory over the Detroit Tigers. Gonzalez admitted after the game the ball hit him around the knee -- and a replay confirmed that -- but the play stood.

"As soon as he hit the ball and saw the ball was fair, he didn't stop himself," Gonzalez's translator said. "He was trying to go to first base. He knew the job was done."

The bases were loaded with nobody out when Gonzalez bunted. Right-hander Thad Weber (0-1), who was making his major league debut, had no play at the plate on runner Nelson Cruz. Weber froze with the ball, and first baseman Miguel Cabrera struggled to get back to the bag in time. Everybody was safe, and Texas took the lead.

Detroit manager Jim Leyland came out to argue, but to no avail.

"I saw just what it did: The ball came down and hit him on the back knee. Clearly. Clearly. That's not even a question," Leyland said. "The ball clearly hit him, and four guys happened to miss it. That's part of the game.

Plate umpire Tim Welke had a chance to watch the replay afterward and said the ball did in fact hit Gonzalez, but his crew hadn't seen that initially.

"We did not see the ball hit anybody on the field," Welke said. "We called what we saw."

Gonzalez appeared to be in the batter's box still when the ball hit him, meaning it would have almost certainly been ruled a foul ball if an umpire had seen the contact.

Robbie Ross (3-0) pitched a scoreless 10th for Texas, and Joe Nathan finished for his fourth save.

Josh Hamilton homered for the Rangers.

The Tigers led 2-1 in the eighth -- with rookie starter Drew Smyly in line for his first career win. But Texas tied it when Elvis Andrus drew a walk, went to second on a wild pitch and took third when catcher Alex Avila's throw to second went into the outfield for an error.

Hamilton hit a sacrifice fly to even the score.

Weber, who was called up from the minors in between games of Saturday's doubleheader, made his major league debut in the 11th. He walked Cruz and allowed singles to Mike Napoli and Yorvit Torrealba, setting up Gonzalez's at-bat with the bases loaded.

"Bases loaded, nobody out and the right person in the batter's box. The guy who was in the batter's box is one of the guys I do my fundamental stuff with," Texas manager Ron Washington said. "I had warned him that if this situation came up, look for the squeeze on the first pitch."

Weber then got out of the inning without any further damage by getting pinch-hitter Mitch Moreland to hit into a double play and Ian Kinsler to ground out.

Smyly pitched six innings, allowing a run and five hits with two walks and seven strikeouts, but he had to settle for his third straight no-decision. He's allowed only two earned runs in 16 innings on the season.

Texas starter Colby Lewis allowed two runs and seven hits in seven innings.

Hamilton gave Texas a 1-0 lead in the first with his seventh homer of the year, and Michael Young followed with a single to extend his hitting streak to 10 games. But Smyly settled in nicely after that.

Detroit tied it in the third when Ramon Santiago hit a leadoff triple and eventually scored on a two-out wild pitch.

In the sixth, Hamilton hit a single and went to second on a groundout. He then took third when -- after one of Smyly's pitches -- catcher Avila's throw went over the southpaw for an error.

Smyly recovered, striking out Cruz and retiring Napoli on a flyball to end the threat.

Brennan Boesch hit a tiebreaking solo homer in the sixth, but Detroit couldn't hold on.

Game notes

The Tigers are off Monday. The Rangers are back home against the Yankees. Texas LHP Derek Holland (2-0) faces New York LHP CC Sabathia (1-0). ... Detroit RHP Doug Fister, on the 15-day DL since April 8 with a left side strain, says he doesn't have a specific timetable for his recovery. ... Cruz threw out Cabrera from the warning track in right in the third when the Detroit slugger was trying to stretch a single to a double. ... Avila made two errors but also threw out two runners trying to steal.