BOSTON — A sold-out Fenway Park crowd kept making noise, even with the Boston Red Sox trailing 2-0 and showing no signs of offensive life.

“That’s Fenway. That’s Boston,” pitcher David Price said.

The fans were rewarded Thursday.

Boston scored twice in the ninth inning, then won on Hanley Ramirez’s walk-off single in the 12th to beat Tampa Bay, 3-2.

Price got a no-decision for seven shutout innings, but rookie reliever Bobby Poyner earned a first major league win with two scoreless innings.

“Awesome,” said Poyner, who ended last season with the Portland Sea Dogs. “Anytime you’re up here, you want to contribute.”

Boston, after losing its season opener to the Rays, has won six straight.

“It’s early,” Ramirez said. “We’ve got to keep going.”

Ramirez is going, with a .310 average, and six RBI, including two on Thursday and two in the 13th inning Tuesday against the Marlins.

“He’s put together good at-bats since the first day of spring training,” first-year manager Alex Cora said.

Boston needs good at-bats. The offense has struggled but the starters have a combined ERA of 0.86.

Boston had no hits from the fourth through the eighth innings.

Tampa Bay (1-6) took a 2-0 lead in the eighth when Matt Duffy swatted a two-run homer off Carson Smith.

In the ninth, Mookie Betts led off with a single against closer Alex Colome. Andrew Benintendi followed with a walk and Ramirez scored Betts with a line single to center. But J.D. Martinez hit into a double play, sending Benintendi to third.

Xander Bogaerts then laced a ball off the left-field wall, just off the glove of Mallex Smith, for an RBI double to tie the game.

Boston loaded the bases on an intentional walk and infield single. Jackie Bradley Jr. hit a slow grounder to second baseman Daniel Robertson, whose throw just beat Bradley. The Red Sox challenged and the call stood.

Poyner, Boston’s only left-handed reliever, pitched the 11th and 12th innings in his fourth major league appearance. He cruised through a 1-2-3 11th with two strikeouts. Poyner allowed a leadoff single in the 12th. After a sacrifice, he got a flyout before striking out Kevin Kiermaier.

In the bottom of the 12th, Bradley led off with a double and was sacrificed to second. Betts was intentionally walked and then Benintendi walked to load the bases – again after being behind 0-2. Ramirez then launched a deep line drive to right, ending the game.

Kevin Thomas can be reached at 791-6411 or:

kthoma[email protected]

Twitter: @ClearTheBases