OAKLAND, Calif. — Dereck Rodriguez had no problems sliding back into San Francisco's starting rotation after a rare appearance out of the bullpen before the All-Star break.

The Giants even hit a couple of home runs Friday night — a rarity these days for manager Bruce Bochy's ballclub.

Rodriguez pitched three-hit ball into the seventh inning for his fourth consecutive win, sending the Giants to a 5-1 victory over the Oakland Athletics.

"It was just getting back in the mix, throwing off the mound again," Rodriguez said after his first start since July 6. "I felt fine. In three weeks I've had like two outings. It was good."

Pablo Sandoval and Ryder Jones homered for the Giants. Andrew McCutchen doubled, drove in a run and made a pair of sliding catches in right field.

Rodriguez (5-1) was masterful during his first career interleague start. Used as a reliever against the Chicago Cubs on July 11 in between starts, the right-hander allowed one run in 6 1/3 innings. He struck out five, hit two batters with pitches and retired 13 of 14 during one stretch.

Two weeks ago, Rodriguez was fighting for a spot in the Giants' rotation amid a flurry of injuries to the team's top three starters and poor outings by others. The son of Hall of Fame catcher Ivan "Pudge" Rodriguez is likely to stay put now after lowering his ERA to 2.72 — second-lowest among San Francisco's starters.

"The kid's just did a great job since he's been up here," Bochy said. "It's been a pleasure watching how this guy's handled everything that's thrown at him."

Khris Davis doubled and scored for Oakland.

The A's had won 21 of 27, including six of seven at the Coliseum, before losing in front of their first sellout crowd this season.

The Bay Area rivals are in the midst of playing six consecutive games against each other. Oakland won two of three at San Francisco during the final series before the All-Star break.

"There were times where we had chances to put a little more pressure on them, just didn't do it tonight," A's manager Bob Melvin said.

Reyes Moronta retired two batters for the Giants. Mark Melancon and Tony Watson pitched one inning apiece to complete the four-hitter.

Jones, called up from Triple-A Sacramento before the game, hit a go-ahead homer in the fourth. Sandoval went deep in the seventh. Both home runs came off A's starter Edwin Jackson (1-2).

San Francisco had hit only six home runs since July 1, fewest in the majors.

"I had a feeling (on) a 2-0 count he was going to give up a cutter in, so I was sitting cutter in and he threw a slider," Jones said. "Last year it took me five or six games to do something. It's good to get in here and help the team win in some capacity."

McCutchen doubled and scored on Buster Posey's single in the fourth and had a sacrifice fly in the eighth. He did his best work in the field, though.

A Gold Glove winner as a centre fielder in 2012, McCutchen has been uneven in right field this season but made a pair of sparkling defensive plays to take hits away from Matt Chapman in the fourth and Jonathan Lucroy in the fifth. McCutchen finished with eight putouts.

Jackson allowed three runs in 6 1/3 innings. He struck out six and walked one.

RELIEF COMING?

Multiple reports indicated the A's could be close to acquiring Mets closer Jeurys Familia. New York manager Mickey Callaway said he was instructed not to use Familia on Friday night at Yankee Stadium because "there could be a potential trade happening." An All-Star in 2016, Familia has 123 saves for the Mets.

THIS AND THAT

Stephen Piscotty has a 10-game hitting streak. . The sellout was the largest paid crowd at the Coliseum since Aug. 13, 2005. . McCutchen's eight putouts were the most by a Giants right fielder since Randy Winn had eight on April 7, 2006.

TRAINER'S ROOM

Giants: 1B Brandon Belt was placed on the paternity list. Jones started at third base while Sandoval replaced Belt at first. ... 3B Evan Longoria (broken hand) went 2 for 3 with a double and an RBI in a rehab game with Sacramento.

UP NEXT

Giants LHP Madison Bumgarner (3-3, 2.90 ERA) goes for his fifth win in seven career starts against the A's on Saturday night. RHP Trevor Cahill (1-2, 3.10) pitches for Oakland.

___

More AP baseball:https://apnews.com/tag/MLBbaseball