BOSTON — It didn’t take long for Mookie Betts to have his name mentioned alongside Ted Williams.

Betts arrived early at Fenway Park on Sunday to make some tweaks to his swing after going 1-for-8 to start the series, and the result was a three-homer day with a career-high eight RBIs.

“I was finally able to just swing the bat right,” said Betts, who sparked a 19-hit attack as the Boston Red Sox completed a three-game sweep with a 16-2 rout of the Arizona Diamondbacks.

Betts joined the iconic Williams as the only Red Sox hitters since 1913 with multiple three-homer games in a season.

Williams accomplished the feat in the 1957 season, when he hit 38 homers — tied for the second-most in any season of his career.

Betts, meanwhile, now shares the team lead in homers with David Ortiz at 26 and achieved his first three-homer game on May 31 at Baltimore.

“It makes you feel pretty good anytime your name is said with his,” Betts said after hitting a two-run homer in the first inning and adding three-run shots in the second and fifth.

His eight RBIs in a game were the most for any Red Sox player since Bill Mueller hit grand slams from both sides of the plate and added a solo shot for nine RBIs at Texas on July 29, 2003.

“Pretty spectacular,” Red Sox manager John Farrell said of Betts’ day. “Just electric bat speed against a very good either in (Zack) Greinke, so just one (heck) of a day for Mookie.”

Rick Porcello (16-3) had all the support he needed to join Toronto’s J.A. Happ as the majors’ only 16-game winners. He improved to 12-0 at Fenway in 2016, and the Red Sox have won all 13 of his home starts.

“Guys swung the bats tremendous today against one of the best pitchers in the game,” Porcello said after giving up a run on three hits with four strikeouts in seven innings. “Got off to a big lead, and I didn’t want to mess it up.”

Dave Ferriss was the last Boston pitcher to start a season 13-0 at Fenway in 1946.

Porcello hadn’t won more than 15 games in a campaign, a total he reached with Detroit in 2014. The impressive outing also lowered his ERA to 3.30.

If he continues on this pace, the right-hander might receive consideration for the American League Cy Young Award.

“When we look up toward the end of September, he’ll be in the conversation,” Farrell said. “We’ve got that much confidence in him.”

Jackie Bradley Jr. socked a two-run homer and had three RBIs and Dustin Pedroia logged his team-record fifth-career five-hit game and added two RBIs.

Boston bested its previous season high of 15 runs against Minnesota on June 11.

The Red Sox (64-52) have won three straight games after losing four of five.

Arizona (48-69) had won four in a row before being swept in the three-game series at Fenway.

Greinke (11-4) was pulled after only 1 2/3 innings, allowing nine runs on 10 hits — including three homers, two to Betts — with three strikeouts.

“It just seemed like my stuff was really flat today,” said Greinke, who had won eight straight decisions before Sunday’s debacle.

“Try to find answers for why (it was a) bad outing or just throw it away. Just hope you get stuff a little sharper for next game.”

Michael Bourn clubbed a solo shot for his third homer of the year in the fourth. He added an RBI single in the eighth for the Diamondbacks’ only runs. Arizona used seven pitchers in the blowout.

Boston did the bulk of its damage during its seven-run second frame and a six-run fifth.

“I wish there was a run bank that we could open up an account and put some of them in and withdraw when needed,” Farrell joked.

NOTES: Boston placed RHP Steven Wright (right shoulder inflammation) on the 15-day disabled list, retroactive to Aug. 8. “While he’s making progress, felt like it wasn’t probably the time to push this,” Farrell said. RHP Clay Buchholz will start Thursday at Detroit. … Red Sox 1B Hanley Ramirez was placed on the bereavement list after Sunday’s game and LHP Roenis Elias, who pitched two one-run innings in relief, was optioned to Triple-A Pawtucket. … Boston SS Xander Bogaerts, who was 3-for-16 on the team’s homestand and is batting .159 (7-for-44) in August, was given a day off. … Arizona moved LHP Patrick Corbin to the bullpen. Corbin (4-12, 5.58 ERA) allowed eight runs (four earned) and nine hits in 1 2/3 innings in Friday’s 9-4 loss. RHP Zack Godley took his spot in the rotation. … Diamondbacks LHP Andrew Chafin (left shoulder tendinitis) paused his rehab assignment after tweaking his groin. … Arizona C Welington Castillo (bereavement list) is expected back with the team Monday. … Red Sox LHP Drew Pomeranz (0-2, 5.26 ERA) opposes Indians RHP Josh Tomlin (11-5, 4.18 ERA) while Diamondbacks LHP Robbie Ray (5-11, 4.57 ERA) counters Mets RHP Bartolo Colon (10-6, 3.35 ERA) on Monday.