Washington Nationals’ BryceHarper, left, is held by first base coach Tony Tarasco as he argues with umpire Jeff Gosney, not pictured, after Gosney ejected Harper in the fourth inning of an exhibition spring training baseball game against the St. Louis Cardinals. (David Goldman/AP)

Bryce Harper earned a rare spring training ejection in the Nationals’ 3-2 loss to the Cardinals this afternoon, getting tossed in the fourth inning after a close call at first base and an expletive that may or may not have been at Jeff Gosney, the first base umpire who gave him the thumb.

“He said the magic word,” Manager Matt Williams said. “I don’t know what he said, but the umpire told me he said something to him. The question I had with it was, ‘Did he say something?’ I didn’t see him make a gesture toward him or anything. But he said the magic word. So I had to go out there and have a discussion about it.”

In his second at-bat of the afternoon, Harper grounded an Adam Wainwright sinker to second base. He sprinted down the line and arrived at almost the same time as Mark Ellis’s thrown. Gosney called him out. Harper trotted past Gosney on his way back to the dugout.

Harper muttered something as he passed Gosney. It was not clear if Harper was expressing frustration at himself or anger with the call.

“But evidently the umpire thought he was addressing it to him,” Williams said, “so that’s why he took the action he did.”

First base coach Tony Tarasco separated Harper from Gosney. Williams jogged from the dugout to help the cause. They dragged Harper away, and he walked off the field. As he crossed the mound, Wainwright told, “That was a great at-bat.”

“Because it was,” Wainwright said. “He fouled off a bunch of pitches. He kind of turned away and started walking off, then he looked back and said, ‘Thanks, by the way.’ ”

The Nationals did not make Harper available for comment.

Williams attributed part of Harper’s actions to late-spring malaise.

“I think everybody’s a little chippy at this point,” Williams said. “Everybody’s ready to go. And Bryce is fiery. If he said something he shouldn’t have said, the umpire felt it was appropriate to do that.”

Once Gosney tossed Harper, Williams continued the animus with the umpires. Third base coach CB Bucknor instructed Harper to leave the Nationals’ dugout, which is standard after an ejection. At Roger Dean Stadium, there is no tunnel from dugout to clubhouse – Harper needed to walk in foul ground down the left field line, though an opening in the fence.

Williams argued to let Harper remain in the dugout until the inning ended. Bucknor wouldn’t allow Harper to stay. Williams trudged to third base and argued. As the conversation went on, Harper grabbed his helmet and bats and walked toward the fence. Fans along the rail asked for autographs; Harper went on his way.

“I just didn’t want him to be embarrassed and have to walk in front of everybody down the line,” Williams said. “That’s all.”

Williams sympathized with Harper based on shared experience. As a player with the Diamondbacks, Williams said, he was once thrown out of a minor league rehab game at Class A Lancaster. Williams needed to take four at-bats. After his first at-bat, there was a close play at third base.

“I thought he was out,” Williams said. “Umpire said safe. I said, no, he’s out. We went back and forth and he tossed me. And I went: ‘Wait a minute, I’ve got three more at-bats!’ It was too late at that point. No do-overs.”

Still, Williams wanted to deliver Harper a message. He wants him to keep playing with passion, but he also wants him to ensure the Nationals do not lose his bat in an important game.

“As it turned out, he would have gotten a couple more at-bats and it could’ve made the difference,” Williams said. “You must play the game with emotion. Bryce wants to be safe there. My thought is, he could express it in a better way and not necessarily get thrown out of the game. But he must play with emotion. We’ll certainly have many talks about situations like that and go forward.”