As manager Joe Maddon spoke of Wednesday's series finale in must-win terms, the recent trending certainly wasn't good, the Rays losing five of their past six and not looking good in doing so, and the matchup far from favorable, with struggling Jeremy Hellickson facing sizzling Sonny Gray.

"The classic reverse lock," Maddon joked, using betting parlance in concocting a reason for optimism.

But by the end of the afternoon, the Rays, and Hellickson, were the unexpected big winners, beating the baseball-best A's, and Gray, 7-3.

The victory was important by itself. It prevented a sweep and stopped a further slide as the Rays improved to 55-59 and remained 51/2 games back in the race for the second American League wild card and, for what it's worth, moved within 91/2 of the Orioles in the AL East.

And there was a resuscitation of the sputtering offense, with three RBIs from Kevin Kiermaier and an actual big hit with the bases loaded by Desmond Jennings, as the Rays scored seven to chase Gray — who had allowed seven runs total in his past six starts — in the fifth.

But the most significant development by far was the outstanding performance by Hellickson, who not only won for the first time in four starts since coming off the disabled list but looked quite sharp in doing so, allowing one run and two hits over a season-high seven innings.

"That looked like the rookie of the year Hellickson right there," Maddon said.

It certainly looked better than the Hellickson of the past year. He went 2-7, 7.15 in the last half of 2013, had arthroscopic elbow surgery in January, rejoined the Rays in July and didn't get through five innings in his first three starts.

What was different Wednesday?

Just about everything.

His fastball was crisper, which made his changeup more effective. He worked more quickly. And, perhaps most importantly, he was aggressive from the start, challenging hitters rather than nibbling.