NEW YORK — Boston’s Ryan Dempster was suspended for five games and fined by Major League Baseball for intentionally hitting Yankees star Alex Rodriguez with a pitch last weekend.

The penalty was announced Tuesday by MLB senior vice president Joe Garagiola Jr., two days after Dempster hit A-Rod in the second inning at Fenway Park. Yankees manager Joe Girardi was fined for arguing with plate umpire Brian O’Nora.

Dempster’s fine was $2,500 and Girardi’s was $5,000, people familiar with the discipline told The Associated Press. They spoke on condition of anonymity because the amounts were not announced.

Dempster could still play if he appeals. And since Boston is off Thursday and Monday, he could also just serve the suspension and get pushed back from Friday to Tuesday in the Red Sox rotation.

Earlier Tuesday, Girardi insisted it would be “open season” on Rodriguez if MLB failed to suspend Dempster.

“I think I made my feelings pretty clear then,” he said after the suspension was announced.

Dempster threw one pitch behind A-Rod’s knees and two more inside during the second inning. Then his 3-0 pitch struck Rodriguez’s left elbow pad and ricocheted off his back.

Girardi sprinted onto the field, screaming at O’Nora for not ejecting the pitcher. Girardi was tossed as the benches and bullpens emptied, and Rodriguez homered off Dempster to spark a sixth-inning rally that lifted New York to a 9-6 win.

Dempster maintained he was pitching inside and wasn’t trying to hit Rodriguez.

“That baseball is a weapon. It’s not a tennis ball. Or it’s not an Incrediball that’s soft. It’s a weapon, and it can do a lot of damage to someone’s life,” Girardi said before a doubleheader against Toronto. “And that’s why I was so upset about it. You can express your opinion and be upset with someone, but you just can’t start throwing baseballs at people. I mean, it’s scary.”

Girardi said his profane rant at O’Nora probably was the angriest he’s been on a ball field.

Rodriguez was suspended for 211 games on Aug. 5 for violating baseball’s drug and labor agreements but is playing while he appeals. Red Sox pitcher John Lackey criticized the rules last week for allowing A-Rod to play.

Girardi said prior to the announcement that if Dempster wasn’t punished, it would make Rodriguez “open season for people, and that can’t happen. It’s not fair. If a player is suspended for throwing at someone, they’re going to get their appeal. Are we just going to throw that out, too?”

Asked later if the level of penalty would make it open season, he responded: “That’s my concern. We’ll find out. I sure hope not.”

“If you suspend a position player three games he misses three games,” Girardi added. “You can suspend a pitcher five games, even six games and he may not miss a start. The off days come into play.”

New York didn’t retaliate Sunday. Girardi wouldn’t say whether there is a need to respond when the teams next meet, at Yankee Stadium on Sept. 5.

Girardi said “protecting your own” in baseball has gone on for “for a long time. And unfortunately you’re part of those situations sometimes, but that’s part of the game.”

The manager also discussed the matter with his 6-year-old son, Dante.

“Part of pitching is pitching inside, that’s all part of it,” he recalled telling the boy. “But I don’t ever want you to hit anyone on purpose.”

After Sunday’s game, Rodriguez declined to say whether Dempster should be suspended.

“I’m the wrong guy to be asking about suspensions. Holy mackerel,” A-Rod said with a laugh. “I’ve got an attorney I can recommend.”