There was a magician in the Tampa Bay Rays' clubhouse before Sunday's game performing card tricks and sleight of hand, so you might say there was magic in the air at Tropicana Field — at least as far as the home team was concerned.

Need proof?

Roberto Hernandez won his first game since late in the 2011 season.

The struggling Yunel Escobar had three hits, including his first home run of the year.

And the Rays, who limped back to town early Friday after a horrendous road trip, finished off a three-game sweep against the Oakland A's, who began the day atop the American League West standings.

Alex Cobb on Friday, Jeremy Hellickson on Saturday and Hernandez on Sunday combined to shut down the A's, while the Rays continued to swing the bats well. They scored eight runs twice during the series and extended their streak of at least one home run a game to seven.

“I'd be stupid to sit here and blame it all on the offense and not give their pitching staff credit,” Oakland first baseman Brandon Moss said. “They did an outstanding job of keeping us off-balance all series. They used their off-speed extremely well. Then you get in a count where you think maybe it's an off-speed (pitch) coming, they would paint a heater.”

Hernandez was the latest Rays pitcher to befuddle the Oakland offense. He held them hitless into the fourth inning and earned his first victory of the season and first since Sept. 20, 2011, against the Chicago White Sox when he was a member of the Cleveland Indians and known as Fausto Carmona.

“Oh, wow, a long time,” Hernandez said when reminded of the winless drought. “It felt good to win.”

Hernandez ran into some trouble in the fourth and fifth innings due to a breakdown in his mechanics, Maddon said, but he managed to get out of both jams while allowing only one run.

“I saw him make pitches that he had to make,” right fielder Ben Zobrist said. “I thought that the big thing was when he got in trouble, he made the pitch he had to make. He threw a lot of first-pitch strikes, which I thought was good. He really kept them off-balance. I thought he did a great job of throwing all his pitches for strikes, and because of that they weren't able to sit on one pitch.”

Hernandez allowed a season-low three hits and struck out seven for the third time in four starts.

“I think to this point, Roberto's actually pitched pretty well without any real good luck,” Maddon said. “He was a little bit better (Sunday). You could just tell by the called third strikes. The ball was just moving a lot. I still believe mechanically he can get more sound overall, and as he does you're going to see him get even better.”

The Rays gave Hernandez some runs to work with, scoring three times in the first inning and once more in the second.

The first-inning runs came home without the benefit of a hit. One scored when right fielder Josh Reddick dropped Evan Longoria's fly ball, another when Sean Rodriguez was hit by a pitch with the bases loaded, and the third on a sacrifice fly by Kelly Johnson.

Escobar's leadoff homer in the second made it 4-0, and those were more than enough runs to finally make a winner out of Hernandez.

“I really thing that's something for him to build off of, because if he hasn't won a major-league game since 2011, I'm sure his confidence needed a boost and that was a booster shot right there,” Maddon said.

“I think you're going to see better things out of him because his stuff is really, really good. Now it's just a matter of putting everything together, the delivery to the plate where he can become even more consistent.”