OAKLAND, Calif. (AP) — Joey Gallo homered twice to give him 18 on the season, putting Texas ahead with his sixth-inning drive, and Nick Solak added a late two-run shot as the Rangers beat the struggling Oakland Athletics 5-4 on Tuesday night.

"He's on another planet right now," Texas manager Chris Woodward said of Gallo's mighty bat.

Mike Foltynewicz (2-7) struck out six and walked one over seven innings, allowing two runs and four hits to win for the first time in 11 starts since beating the Angels on April 27. He snapped a four-game losing streak during that span.

Jed Lowrie and Mitch Moreland each homered in the ninth against closer Ian Kennedy, who then finished for his 14th save in 15 chances.

"That gives us some confidence we can get to one of their better arms," Oakland's Tony Kemp said.

Matt Chapman homered in the first to extend his career-best hitting streak to 16 games and Ramón Laureano hit an RBI double in the fourth for the A's, who returned from a tough 10-game, three-city trip and lost for the seventh time in 10 games.

Gallo tied it in the fourth then put Texas ahead with his second homer in the sixth against right-hander James Kaprielian (4-2).

“Just a couple pitches to Gallo ended his day,” A's manager Bob Melvin said.

Foltynewicz made another strong outing against Oakland. He took a shutout into the seventh inning of a 5-3 win over the A’s in his previous start June 23 but didn't receive a decision.

He started using a new curveball grip his last time out and is finding a consistency recently.

“I threw some great ones,” Foltynewicz said. “If it moves good, it makes all my pitches all the better."

Jonah Heim provided an RBI double in the fifth for Texas, which ended a three-game road skid with just its second win in the last 21 away from Arlington.

Kaprielian allowed six hits in six innings after giving up five or fewer in each of his previous eight starts. It also marked the first time in six games that A’s starters surrendered more than two runs.

“I felt like I wasn’t attacking enough,” he said. “That’s what happens. I just have to get back in attack mode.”

Oakland lost following a day off for the first time in 10 games this season.

TRAINER’S ROOM

Rangers: C Jose Trevino slipped in the bathroom Tuesday morning and bruised his right forearm, likely sidelining him for a few days. X-rays were negative. If he’s not better by the conclusion of the series, Woodward said it could become an injured list scenario. ... OF Willie Calhoun underwent surgery in Arlington performed by Dr. Paul Hovis to repair a fractured ulna bone in is left forearm he sustained getting hit by a pitch Saturday. ... RHP Hunter Wood had a procedure on his pitching elbow Monday from Dr. Keith Meister that will sideline him a minimum of eight months.

Athletics: RF Stephen Piscotty (sprained left wrist) took some swings in the cage and is scheduled to do an extensive workout on the field Wednesday. ... LHP Jesús Luzardo threw 63 pitches Sunday for Triple-A Las Vegas as he continues to build up his pitch count after missing time with a broken pinkie in his pitching hand that he injured before a start May 1 playing video games. ... Oakland reinstated RHP J.B. Wendelken from the 10-day injured list after he missed 52 games with a strained left oblique muscle. The A’s selected INF Frank Schwindel from Triple-A Las Vegas, optioning INF Vimael Machín to Las Vegas and designating RHP Cam Bedrosian for assignment.

UP NEXT

RHP Chris Bassitt (8-2, 3.25 ERA), riding a career-best eight-game winning streak with a 2.95 ERA in 14 starts since beginning the year 0-2, pitches the middle game of the series opposite Texas lefty Kolby Allard (2-3, 3.33).

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports