BALTIMORE – Manny Machado led off the ninth inning with a single and scored the winning run on a single by Nate McLouth, and the Baltimore Orioles beat the Tampa Bay Rays 3-2 Wednesday night to retain a share of first place in the AL East.

The rookie also made a key defensive play in the top of the ninth for the Orioles, who moved 18 games over .500 (80-62) for the first time since the end of the 1997 season..

B.J. Upton homered for the Rays, who fell three games behind the Orioles. Tampa Bay stranded 11 and went 2 for 10 with runners in scoring position.

Machado led off the ninth with a single off Kyle Farnsworth (1-5), took second on a bunt and scored when McLouth hit a liner off the right-field wall.

In the top of the ninth, pinch-runner Rich Thompson was on second with two outs when Evan Longoria topped a pitch from Jim Johnson (2-1) down the third-base line. Machado picked it up and faked a throw to first as Thompson rounded third. Machado flipped the ball to shortstop J.J. Hardy at third base, starting a rundown that ended with Thompson being tagged out by catcher Matt Wieters.

“I was trying to get Evan out to be honest, but then when I came up I saw I had no chance,” Machado said. “So I did a pump-fake and tried to deke the runner. It was just natural.”

Said Thompson, “I was prepared for him to go to first, wasn’t prepared for Hardy to be backing up. It certainly is one of those plays you will never forget.”

TIGERS 8, WHITE SOX 6: Max Scherzer pitched six effective innings to earn his career-high 16th win, Prince Fielder hit a three-run homer and Detroit won at Chicago to move within a game of the AL Central lead.

MARINERS 3, BLUE JAYS 2: Miguel Olivo hit a solo home run as Seattle won at Toronto.

RANGERS 5, INDIANS 2: Josh Hamilton and Adrian Beltre homered as host Texas beat slumping Cleveland.

ROYALS 10, TWINS 5: Billy Butler had three hits and three RBI, and Kansas City’s bullpen picked up struggling starter Luke Hochevar with four scoreless innings in a win at Minneapolis.

NATIONAL LEAGUE

PHILLIES 3, MARLINS 1: Jimmy Rollins hit a two-run homer and Cliff Lee pitched seven strong innings to lead host Philadelphia to its seventh straight win.

NATIONALS 2, METS 0: John Lannan pitched 52/3 shutout innings and Washington lowered its magic number for clinching a playoff berth to six with a win at New York.

REDS 2, PIRATES 1: Homer Bailey pitched seven solid innings and Cincinnati came up with just enough offense to squeeze out a win over visiting Pittsburgh.

PADRES 3, CARDINALS 2: Clayton Richard pitched seven strong innings and rookie Yasmani Grandal singled home the go-ahead run as San Diego handed visiting St. Louis its 11th loss in 15 games.

BREWERS 8, BRAVES 2: Rickie Weeks blasted a three-run home run and Travis Ishikawa hit a bases-clearing double in an eight-run fifth inning for host Milwaukee.

CUBS 5, ASTROS 1: Alfonso Soriano finished a triple shy of the cycle and drove in two runs, and Travis Wood allowed one run in 72/3 innings to lead Chicago to a win at Houston.