Jurickson Profar homered and drove in three runs, Seth Brown added two RBIs and the Oakland Athletics held off the Kansas City Royals 9-8 on Thursday to cap a four-game series victory.

Everybody in the A’s starting lineup had a hit or drove in a run, bailing out starter Chris Bassitt after a dismal performance. Bassitt failed to survive the fifth before turning the game over to Yusmeiro Petit (4-3), who was just about the only effective pitcher all the afternoon.

Fellow relievers Jake Diekman and Liam Hendriks gave up back-to-back RBI singles in the eighth, then Hendriks gave up a two-out RBI single to Ryan O’Hearn in the ninth. But the former Royals reliever bounced back to strike out Bubba Starling and earn his 17th save.

Glenn Sparkman (3-10) also failed to make it through the fifth for Kansas City, allowing seven runs, nine hits and a walk. He also hit a pair of batters in losing his fifth straight decision.

Sparkman gave up a leadoff single to Marcus Semien, another hit to Matt Olson and plunked two batters _ one of them sending home a run _ in staking Oakland to a 1-0 lead.

Bassitt served up a leadoff since to Whit Merrifield, then let Jorge Soler drill a 1-0 pitch out of the park. The homer was the 37th of the year for the slugging Soler, moving him within one of matching Mike Moustakas for the single-season franchise record.

Sparkman breezed through a perfect second and third before making a mess of everything else.

Profar went deep and Josh Phegley had an RBI single during the A’s three-run fourth, then Oakland tacked on three more runs off Sparkman and reliever Josh Barnes to take a 7-2 lead in the fifth.

Bassitt nearly gave it all back. Over the span of five batters in the bottom half, the right-hander plunked one, gave up a single to another, was victimized by an error and walked the bases loaded. Then, with the bases loaded, Cheslor Cuthbert came within a foot of hitting a tying grand slam _ he wound up with a two-run double instead that drew the Royals within 7-5.

Oakland tacked on another run in the sixth before the Royals got within 8-7 in the eighth. Soler came to the plate with the go-ahead run on first, but Hendriks struck him out to preserve the lead.