NEW YORK -- Dellin Betances and the Yankees' relievers couldn't see the scoreboard from the bullpen in right-center field, so they had no idea a playoff berth was only a few clean innings away.
Giving up the lead still hurt, though.
Betances allowed up a tying homer and Andrew Bailey yielded the go-ahead hit as New York wasted a chance to secure an AL wild-card spot Wednesday night, losing 9-5 in 11 innings to the Boston Red Sox.
"Today was a tough loss. Any time you have a lead that late, you expect to win," the All-Star setup man said. "We try to clinch tomorrow, I guess."
After losses in the first two games of the four-game series and with the chance to wrap up their first trip to the postseason in three years, the Yankees rallied from a 3-0 deficit. Alex Rodriguez reached base four times, and his first homer in two weeks gave them a 5-4 lead in the sixth.
But on a night when Masahiro Tanaka struggled early in his return from a hamstring injury, the Yankees stumbled again. Still, they need just one win in their final four games to earn the playoff spot.
"I thought it was a good sign I came out of this game strong," Tanaka said through a translator.
Mookie Betts tied it with a seventh-inning homer off Betances -- who has allowed six homers this season, all from July 4 on. Betts connected again in the 11th to cap Boston's season-high sixth straight victory and again deny the Yankees their 10,000th win.
"I don't think we are necessarily trying to ruin hopes," Betts said of spoiling Yankees' chance for milestone. "I think we are just going out and playing the game, trying to win some games, and I just that's kind of like a bonus."
Alexi Ogando (3-1) pitched two innings for the win.
New York, which dropped to 65-3 when leading after six innings, left 15 on base and was 3 for 14 with runners in scoring position. The Yankees walked 11 times, including four times in the eighth -- when leadoff batter Jacoby Ellsbury was picked off first.
Tanaka struggled in his first start in 12 days, returning from a right hamstring strain to make what should be his final tuneup before a likely start in the wild-card game on Tuesday.
The Japanese star entered with a deceptive 3-0 record against Boston. He allowed 10 earned runs in those starts, but the Yankees romped to big wins in each. He had trouble Wednesday, too, allowing four runs and five hits in five innings on 95 pitches.
He quickly fell behind, giving up a three-run homer to Travis Shaw in the first.
David Ortiz's RBI single in the third gave him 105 RBI, his most since 2007.
"He looked rusty," manager Joe Girardi said of Tanaka. "He looked like a guy who hadn't pitched in 12 days."
Rodriguez's homer gave him 1,065 RBI with the Yankees, moving him into a tie with Jorge Posada for 11th in club history.
Red Sox: Rusney Castillo (Right quadriceps) was out of the lineup for a third straight game. Interim manager Torey Lovullo said the leg is still has "soreness and tenderness." ... RHP Steven Wright (concussion) still has some symptoms and has not passed the concussion test. He was examined by a specialist in Pittsburgh on Wednesday but the results of the tests were not yet available. ... 3B Pablo Sandoval (pneumonia) has not played since Sept. 20. He's unlikely to play again this season. "To resume all baseball activities would be very challenging to him," Lovullo said.
Yankees: 2B Stephen Drew (dizziness) went to Pittsburgh to see a concussion specialist. Girardi assumes Drew will be back in New York on Thursday.
Red Sox: Rich Hill is 2-0 in three starts. Has 10 Ks in each of the outings. Hill, who has pitched in parts of 11 big league seasons, pitched briefly this summer for the Long Island Ducks, an independent league team.
Yankees: CC Sabathia (5-10) is 1-1 with a 2.25 ERA in four starts since coming off the DL (right knee inflammation) on Sept. 9.
Astros, early in busy stretch, eye another win over Giants
Following a ragged road trip that resulted in six losses over nine games, the Houston Astros opened an eight-game homestand Monday while kicking off a grueling stretch of the schedule.
A's could be minus Laureano vs. Angels
The Oakland A's could be without Ramon Laureano for their Tuesday game against the Los Angeles Angels in Anaheim, Calif., if, as expected, Major League Baseball announces a suspension for the center fielder.
Richards to face Stripling in latest Padres-Dodgers tussle
It might be a shorter season, but the Los Angeles Dodgers continue to see they will have a long duel ahead with the San Diego Padres.
Rockies' Freeland eager to continue resurgence vs. D-backs
Kyle Freeland went through a nightmare of a season in 2018, but the Colorado Rockies left-hander salvaged something out of it, and it's paying off.
Mariners hope to keep bats alive against Rangers
The Seattle Mariners look to continue their sudden power surge when they square off against the homestanding Texas Rangers on Tuesday in the middle contest of a three-game series at Globe Life Field in Arlington, Texas.
With losing streak over, Twins eye more relief vs. Brewers
With starters Rich Hill and Homer Bailey still on the injured list, the Minnesota Twins will turn to a bullpen-by-committee start in Game 2 of their three-game series at Milwaukee on Tuesday.