PORT CHARLOTTE, Fla. (AP) — Josh Johnson had to work out of a few jams Sunday in pitching five scoreless innings for the Miami Marlins in a 5-1 victory over the Tampa Bay Rays.

“A little bit of everything,” Johnson said of his fifth start. “Some good, some bad, some ugly, but I got my pitch count up and got my adrenaline going that last inning, so it was good.”

Miami’s opening-day starter, Johnson allowed three hits, struck out four and walked five. He threw 45 of 79 pitches for strikes.

He walked Evan Longoria in the first, threw a wild pitch and walked Carlos Pena, prompting catcher John Buck to head to the mound.

“I knew he was a little out of whack,” Buck said. “Every time he was delivering the ball it looked a little different. I could see a bunch of his chest, the spin of the ball would change.”

The next two innings were far smoother for Johnson, who hit an RBI double to deep left-center in the second.

“Everything was on time. My tempo was a lot better. I was going after guys, throwing quality pitches. That’s what I’ve been looking for all spring, those two innings right there,” Johnson said.

Johnson encountered trouble in the fourth, giving up a leadoff single to Longoria and loading the bases with walks to Pena and Luke Scott. He induced Jose Molina to ground into an inning-ending, 6-4-3 double play.

Johnson escaped another jam in the fifth, with runners on second and third and no out. He struck out Ben Zobrist and Matt Joyce, then retired Longoria on a flyout.

“You have to do whatever you can to get guys out,” Johnson said. “That’s one of those times you go for the strikeout.”

Marlins head athletic trainer Sean Cunningham and pitching coach Randy St. Claire went out to check on Johnson in the fifth, but he shook them off. They were concerned about a fingernail, which digs into his skin when he throws his slider. Johnson said it’s just something he deals with and has played through for a while.

“That’s normal for him from what I hear,” Marlins manager Ozzie Guillen said. “JJ threw the ball very well. I’m very happy where he is at right now.”

Rays starter Wade Davis struggled in what could be his final bid to make Tampa Bay’s rotation. Davis gave up four runs, seven hits and three walks in 4 2-3 innings with two strikeouts. He threw 52 of 91 pitches for strikes as his ERA rose to 4.91.

It wasn’t an ideal outing for a pitcher competing with fellow right-hander Jeff Niemann for a spot in the starting rotation.

“I would have loved to have done a lot better,” Davis said. “The past couple of spring trainings I’ve had some rough springs. I’ve definitely excelled better this year than I have in the past. But at the same time you want to do better, and I’m definitely on a better track of being ready for the season that I have been in the past physically. My stuff’s sharper, I’ve added more weapons to my repertoire and ultimately it’s not up to me.”

Rays manager Joe Maddon liked what he saw from Davis at the start, when he struck out Hanley Ramirez after the speedy Emilio Bonifacio tripled down the left-field line.

“I thought he started out great,” Maddon said. “I really liked the first inning a lot, and then after that it just, the stuff just went away a little bit. Nothing wrong with him physically, but I really liked the first inning a lot and I thought we were going to see more of that, and then it seemed like after home run it went back into that high-80 range. He still threw some pretty good breaking balls but lost a little bit of his fastball.”

Davis gave up homers to Buck and Bryan Peterson in the fourth, which extended Miami’s lead to 4-0.

NOTES: Marlins LF Logan Morrison (knee), RF Giancarlo Stanton (knee) and INF Greg Dobbs all hit in a minor league scrimmage in Jupiter. Morrison and Stanton could play in the field in a minor league game on Monday. … Rays LF Desmond Jennings (shoulder) played left field and ran the bases in a minor league scrimmage. … Rays SS Reid Brignac (foot) also played in the minor league scrimmage. … The Rays reassigned C Craig Albernaz, OF Brad Coon, 1B Matt Mangini, RHP Jhonny Nunez and RHP Romulo Sanchez to their minor league camp.