Manny Machado looks to the mound after a pitch was thrown behind his head by Red Sox pitcher Matt Barnes during the eighth inning on Sunday. (Gail Burton/AP)

During the eighth inning of Sunday’s game in Baltimore, Red Sox pitcher Matt Barnes threw a pitch behind Orioles third baseman Manny Machado’s head. The ball ricocheted off Machado’s bat, resulting in a strike, but plate umpire Andy Fletcher threw Barnes out of the game, evidently believing that the pitch was retaliation for Machado spiking Red Sox second baseman Dustin Pedroia with a hard slide on Friday.

After the game, Barnes denied, as pitchers generally do, that he was aiming for Machado’s head.

“I would never ever intentionally throw at somebody’s head,” he said, via The Sun. “That’s kind of a line you don’t cross. Um, I’m sorry that it kind of ended up that high, and fortunately, it didn’t hit him, but I think he’s got every right to be mad that that one got loose.”

“He’s trying to go up and in,” said Red Sox Manager John Farrell, who came out to argue Barnes’s ejection. “Make no mistake, the ball got away from him. My comments are what they are. It’s a dangerous pitch when you get up and in there. Thankfully, he didn’t get it.”

After Barnes’s ejection, Pedroia, who sat out Saturday and Sunday with a sore left ankle and knee as a result of Friday’s hard slide, exchanged words with Machado from the Boston dugout. Pedroia was trying to explain to Machado that he didn’t ask the Red Sox to retaliate on his behalf.

“I just told him I didn’t have anything to do with that,” Pedroia said after the game. “That’s not how you do that, man. I’m sorry to him and his team. If you’re going to protect guys, you do it right away. It’s definitely a mishandled situation. There was zero intention of him trying to hurt me. He just made a bad slide. He did hurt me. It’s baseball, man. I’m not mad at him. I love Manny Machado. I love playing against him. I love watching him. If I slid into third base and got Manny’s knee, I know I’m going to get drilled. That’s baseball. I get drilled, and I go to first base. That’s it.”

Orioles Manager Buck Showalter said he was happy that his team didn’t retaliate on Sunday, though Baltimore and Boston will meet for a four-game series at Fenway Park starting May 1.

“We’re not getting involved in that stuff,” he said. “We’ve done it since I’ve been here. We’ll continue to do it. We all have our personal feelings about it. I really respect the courage our players had today. … The courage it takes not to retaliate a lot of times in life is a lot more challenging than doing what ended up happening today.”

MLB Network’s Jon Morosi reported that MLB will review tape of Sunday’s game before determining any possible discipline for Barnes and fellow Red Sox reliever Eduardo Rodriguez, who threw three inside pitches around Machado’s knees in the sixth inning.

As Yahoo’s Jeff Passan notes, history suggests that Barnes could face anywhere from a three- to six-game suspension, which history also suggests isn’t a harsh enough penalty to disincentive pitchers from continuing to throw retaliatory fastballs at hitters’ heads.

“Perhaps this is wishful, but the threat of a 20-game suspension and significant fine would seem to meet that standard,” Passan writes of what it will take to get rid of headhunting. “The intention of this is not to usher in an era of punitive penalties in MLB. It’s to legislate away revenge pitches, which almost always result from the breaking of unwritten rules, which in most cases are more of a pox on the game than something that do what they’re supposed to, which, ironically enough, is keep the peace.”