Cole Figueroa is one of those heady players considered a student of the game. So with all the baseball he has watched, he took note of how players react, specifically what evasive maneuvers they take to avoid raucously celebrating teammates, after getting walkoff hits.

That research came in handy Friday when Figueroa, the rookie infielder in his eighth major-league at-bat, delivered a ninth-inning double that gave the Rays a second straight walkoff win, 1-0 over the Red Sox.

It was the first walkoff hit of Figueroa's career at any level — well, at least going back to T-ball, he said — and he wanted to enjoy it, leading his mates on a merry chase into the outfield.

"I'd seen it on TV lots of times, and I was like, 'That'd be pretty cool to do,' " he said. "And when I got to second, I was like, I might as well make this last. I got a head start, and I didn't play. So I was pretty fresh."

The Rays eventually caught up to Figueroa, beating on him then dousing him with Gatorade and shaving cream. They had plenty to celebrate: their first back-to-back walkoff wins since 2009 — after going 71/2 weeks without one — and escaping the American League East cellar, moving percentage points ahead of the Sox, who lost their eighth straight.

"A really great moment for us," manager Joe Maddon said.

The first eight innings, before 20,898, were a combination of excellent pitching and failed hitting as both teams wasted multiple chances.

Starter Chris Archer posted six zeroes for the Rays (21-28), tying a career high with 11 strikeouts while allowing four hits and throwing a career-high 119 pitches. Maddon gave him the opportunity to throw that many for several reasons: Archer was pitching with two extra days' rest, he had "great stuff," and Maddon saw it as a growth moment.

So, too, did Archer, noting, "I was able to battle through and throw the most pitches I've ever thrown and still be strong late in a game."

The Rays went to Jake McGee, Joel Peralta and then Juan Carlos Oviedo rather than Grant Balfour, who was off due to recent heavy usage, including Thursday's blown save.

After a big play on a bunt by Evan Longoria, the Rays' winning rally started when Desmond Jennings drew a one-out walk off lefty Andrew Miller. As the Sox switched to former Rays righty Burke Badenhop, Maddon decided Thursday star Sean Rodriguez would have a tough time and had bench coach Dave Martinez summon Figueroa. (Note here that had leadoff man James Loney gotten on, Figueroa would have pinch run and not hit.)

"(Martinez) said, 'If the righty comes in, we're going to pinch hit and you're going to go up there and win the game for us,' " Figueroa said. "I don't think I had time for (nerves)."

Figueroa took a strike then with a hit-and-run called had to watch an outside pitch go, though Jennings stole successfully. After another strike, Figueroa delivered with a drive to right-center.