BOSTON — Take away one botched fly ball in short left field, and the Baltimore Orioles played a perfect baseball game on a chilly night at Fenway Park on Monday.

And they even may have gotten what could be the payback for Matt Barnes almost hitting Manny Machado in the head 10 nights earlier.

The Orioles (16-8) got another strong start from Dylan Bundy, a home run and two RBIs from Machado and some timely hitting to cash in on three Red Sox errors in the eighth inning en route to a 5-2 win over Boston in the opener of a four-game series.

Baltimore also delivered all kinds of defensive plays, four of them by Machado.

“I’d like to say that’s the best defensive game I’ve seen Manny have, but he’s had a few of those,” manager Buck Showalter said after his team beat reigning Cy Young winner Rick Porcello. “I was telling him it’s kind of like a basketball game where you isolate Larry Bird or somebody and get out of his way and try to throw a pitch and hit it towards Manny.

“I can’t tell you how hard those plays are — and Adam (Jones, in center) put a show on out there. I thought Ryan (Flaherty, in left) made a couple of good plays too.”

Bundy (4-1) turned in his sixth straight quality start and shut the Red Sox out through seven innings to beat them for the second time in three starts already this season. The botched fly ball led to two runs off Bundy in the eighth, but the Orioles had just cashed in three runs on three Boston errors in the top of the inning.

Bundy wound up throwing seven-plus innings and allowing two runs on five hits and four walks. He struck out two.

“Dylan threw a hell of a game,” said Machado, roundly booed all night. “We did all the little things. It was a fun day. We played great defense overall.”

There was anticipation coming in that the Orioles would retaliate for a pitch thrown by Barnes near Machado’s head two days after Machado spiked Red Sox second baseman Dustin Pedroia. All was quiet until Bundy, who did walk four, threw his two hardest pitches of the night, one near Mookie Betts and the next one hitting Betts high on the left leg.

The Orioles denied intent. Red Sox manager John Farrell, not in a great mood after his team made four errors for the second time in three games, said, “I can’t answer that. That’s a question he’s going to have to answer.”

Betts said, “You’d have to ask him. It is what it is. It hit me and I take my base.”

Said Porcello: “I have no comment on that. I can’t tell you what they’re thinking or what they’re trying to do there. What was the count, 2-1? Who knows? I don’t know. Thankfully Mookie’s all right and we’ll go out there and kick their ass tomorrow.”

Porcello, who allowed two runs in six innings, lost his fourth straight start to match his loss total from last season. Porcello (1-4) has left all four starts with the Red Sox having no runs. Last year, when he went 22-4, he was backed by huge offense — 6.6 runs per nine innings, highest in the majors.

He has allowed just four earned runs in 19 2/3 innings over his last three starts.

After he left Monday’s game, the Red Sox again fell apart in the field — not to mention Hanley Ramirez steaming into second base in a two-run eighth inning, only to find teammate Andrew Benintendi standing on the bag.

The Red Sox have made 10 errors in the last four games and 12 in six games on their current homestand.

“We’re in a tough stretch defensively, far (under) what our capabilities are and we need to clean it up,” said Farrell.

Light-hitting Caleb Joseph, a late starter with Welington Castillo scratched with neck spasms, doubled home the game’s first run in the fifth inning. Joseph, a .213 lifetime hitter coming in, collected his 12th hit in 42 Fenway Park at-bats — his seventh Fenway RBI, more than he has in any road ballpark.

NOTES: The Red Sox placed RHP Steven Wright on the 10-day disabled list with a left knee sprain and recalled RHP Brandon Workman. … Orioles LHP Zach Britton should be able to come off the 10-day disabled list Tuesday after a pair of rehab outings. … Britton said Red Sox 2B Dustin Pedroia reached out “to a veteran member of our team” to try to clear the air over the problems in Baltimore — while Orioles GM Dan Duquette, in a local radio interview, blamed RHP Matt Barnes and manager John Farrell for the pitch thrown at Manny Machado’s head. … RHP Mike Wright was recalled by the Orioles, and RHP Logan Verrett was optioned. … Boston LHP Chris Sale faces Baltimore RHP Alec Asher on Tuesday night. … Red Sox RHPs Carson Smith (Tommy John surgery) and Tyler Thornburg (shoulder impingement) are both set to start throwing off a mound for the first time — Smith on Tuesday and Thornburg not far behind.