The amazing turnaround for the Baltimore Orioles continued on Thursday afternoon, as the team won to clinch their first winning season in 14 years.

The Orioles beat the Tampa Bay Rays 3-2 in 14 innings to complete a three-game sweep to earn their 81st victory, enabling them to finish no worse than .500 on the season. It will mark the first time since 1997 that the Orioles will have a winning record.

"There's a bigger goal in mind," manager Buck Showalter told the Associated Press. "That wasn't the goal from Day One this spring. Really, Day One of the offseason. It's watching other teams for years and saying, 'We want to do what they're doing.' We'd like to get a chair at the dance, you know?"

Rookie Manny Machado hit an RBI single that went by left fielder Matt Joyce in the 14th inning to win the game and keep Baltimore tied with the Yankees atop the American League East.

The Orioles won earlier than the Yankees, so for a few hours they have first place to themselves, up by a .5 game. But New York shutout Boston 2-0 behind Phil Hughes to keep the two teams tied at 81-62.

Baltimore also won their 13th extra-inning game in a row and are only the third major league team in history to accomplish that. The Orioles are now set for a six-game west coast road trip against the Oakland Athletics and the Seattle Mariners.

"It makes that West Coast trip a little easier when you win," said closer Jim Johnson. "You can enjoy it for a little bit, the five hours you're on the flight, but that's about it."

The Orioles have played extremely well all season in one-run games, going 27-7, while the Rays have dropped 13 of its last 16. The team fell to four games behind in the division.

"It's just the same old story: We can't score enough runs," manager Joe Maddon said. "We pitched extremely well, we played well in the field overall, loved the effort."

Tampa left 10 runners on base through the game and only hit 1 for 7 with men in scoring position.

Baltimore rookie Wei-Yin Chen was solid, giving up only two runs on eight hits in 7 1/3 innings. In the eighth inning Chen was pitching with a 2-1 lead when he walked the leadoff hitter Desmond Jennings, who later stole a base and scored when Ben Zobrist muscled out an infield single.

But the Orioles bullpen held the Rays in check for the rest of the game, allowing no runs on just four hits in 6 2/3 innings.

Baltimore had chances in the extra frames to win the game, including in the 13th inning when they loaded the bases with no outs. The Rays played five infielders and didn't allow a run after a force out and two strikeouts by Matt Wieters and Nate McLouth.

"We came up short that inning," Machado said, "but we won it in the next."

The Rays had an early lead in the game after a Jeff Keppinger sacrifice fly that scored Zobrist, but the Orioles took over in the seventh, scoring two runs.

Tampa Bay starter Jeremy Hellickson was solid, allowing only four hits in five innings.

The game lasted for over five hours and featured sixteen different pitchers/ The Rays used a franchise-record 26 players in the game.

The Orioles improved their winning percentage in one-run games to .794 (27-2). According to the Elias Sports Bureau, if that lasts to the end of the season, it would be the highest of all-time.