BALTIMORE -- Boston Red Sox manager John Farrell and pitcher Wade Miley downplayed the heated exchange that took place between them in the fourth inning Thursday night, when a clearly agitated Miley went nose to nose with the manager, then waved him off even as Farrell was following him down the tunnel to the clubhouse.

The cause of their disagreement, both manager and player said after Boston's 6-5 loss to the Baltimore Orioles, was Farrell's decision to lift the left-hander after the fourth inning. The Red Sox trailed the Orioles 5-3 at the time, and Miley had allowed runs in each of the four innings he had pitched on a yield of nine hits, including three home runs. In his previous 11 starts this season, Miley had allowed a total of four home runs.

But Miley erupted in anger upon returning to the dugout after the fourth, when he was informed by Farrell that he was done for the night and was being replaced by knuckleballer Steven Wright.

"Oh, he's a competitor," Farrell said after the game. "You work four days for your start. He doesn't want to come out of the ballgame, and I fully respect that. I thought he had good stuff overall, but where we were on the scoreboard, [I] felt we needed a change in contrast, a change in style, and took him out."

The confrontation was caught on camera by NESN, the regional sports network owned by the Red Sox.

Farrell said he and Miley had a chance to talk again after the confrontation. Asked whether he believed Miley understood his reasoning, Farrell said, "I think so. He may not like it. That's understandable. Stephen came in, a change of contrast, a change of style, and settled things down."

Miley had not yet changed into his street clothes when he addressed the media gathered around his locker.

"Between me and John," Miley first said when asked about the incident. "It is what it is."

Asked whether there was more involved than being removed from the game, Miley said, "No. It's over. Everything that happened is over. You want to talk about the game, we can talk about the game."

Miley lamented that the Orioles did almost all their damage in what he regarded as a pitcher's count, "where I'm in control."

Adam Jones hit a 1-1 changeup for his 10th home run in the first. Nolan Reimold hit a 2-2 fastball that Miley intended to throw inside but left over the plate for his first home run in the third. Manny Machado hit a similar pitch for his 10th home run with two out in the fourth on another 1-1 count.

Of Baltimore's nine hits, seven came after Miley had gotten two strikes on the hitter.

"On a night in this ballpark when it heats up, a ball in the air doesn't have much to hold it in," Farrell said, alluding to a game-time temperature of 90 degrees. "It was more elevation in the strike zone."

As hot as Miley was when he confronted Farrell, he insisted afterward that the manager understood his frustration.

"Absolutely," Miley said. "We're all grown men here. We talked. He's competing from his end of it, I'm competing from my end of it. Just, it's over."

After replacing Miley, Wright gave up an unearned run in 2⅔ innings. He allowed one hit, a drive by Delmon Young in the fifth that struck center fielder Mookie Betts' glove and was scored a double. Betts redeemed himself when Jones was cut down at the plate on a strong relay by shortstop Xander Bogaerts.

The unearned run, the result of a throwing error by third baseman Pablo Sandoval in the seventh, ultimately proved to be the deciding run as the Orioles completed a three-game sweep, dropping the Red Sox to a season-worst seven games behind the first-place New York Yankees in the American League East. Miley's record dropped to 5-6, his ERA rising to 5.07 after the fourth time in 11 starts he has not gone more than four innings.

In September, while pitching for the Arizona Diamondbacks, Miley had a similar confrontation with manager Kirk Gibson after being removed from a game.

"I think we all know Wade is a strong competitor," Farrell said. "There's a lot of fight in him, there's fight in us, and that showed inside this game. Unfortunately, we came up on the short end, but there was no lack of competitiveness with Wade."