Joe Maddon was fed up with the Pittsburgh Pirates on Thursday.

The Chicago Cubs manager was ejected from the afternoon contest in the fourth inning after leaving his team's bench, then pointing and yelling at the Pirates' dugout.

Several Cubs players and home plate umpire Joe West had to restrain Maddon before the skipper left the game.

Joe Maddon upset with Pirates manager for the high inside pitches. Goes after him. Is he trying to fire his listless team up? pic.twitter.com/tqwwCbVbQO — Bears Barroom (@BearsBarroom) July 4, 2019

Maddon appeared to be upset with the Pirates because a pitch from right-hander Jordan Lyles nearly hit Cubs second baseman Javier Baez.

It was the second time in the game that Lyles threw a pitch up and in toward Baez.

An inning later, a 94-mph pitch from Pirates right-hander Clay Holmes hit Cubs third baseman David Bote in the helmet.

Pirates love to throw high and inside and David Bote catches one off the helmet. No warning to the Pirates. Bote is ok pic.twitter.com/5Da8WrPxJt — Bears Barroom (@BearsBarroom) July 4, 2019

Bote stayed in the game after he was visited by a trainer.

After the Cubs took home an 11-3 win, Maddon said "he can't wait" to face Pittsburgh in Chicago next week before clarifying he wasn't yelling at Pirates manager Clint Hurdle during the incident, according to Will Graves of The Associated Press.

"It was getting way too out of control, culminating in David getting hit in the head," Maddon said, according to Mark Gonzales of the Chicago Tribune. "I have no issues with pitching inside ... but when you get that many pitches, not just that tonight, but it's been that way somewhat during the entire series.

"They have their pitching philosophy ... I appreciate inside. I don't appreciate up and in and neither do the rest of us. They just need to be careful."

The Pirates visit the Cubs for a three-game set at Wrigley Field from July 12-14.