J.J. Hardy is day to day, and already was slated to have Monday's game off. (AP)

BOSTON -- Orioles shortstop J.J. Hardy exited Sunday night's game after six innings with a right hamstring strain and is considered day to day.

Hardy was replaced in his seventh-inning at-bat by Steve Lombardozzi, and he suffered the injury while running the bases during his fifth-inning at-bat against the Red Sox.

"Never had this before," said Hardy, who missed six games with back spams earlier this season. "When I came back from the back thing, I felt this hamstring was really tight. I don't know if it was from favoring the back or whatever. I've played through a little bit of soreness there since I've come back from the back. Tonight, it just kind of moved a little bit from where I had been playing with it. I don't know how serious it is.

"[It's] frustrating. ... It's just seems like one thing after another. And all this has just come up out of nowhere."

Hardy, who hit a sacrifice fly in the first inning, singled in the fifth and would have scored if David Lough's hit hadn't been ruled a ground-rule double. His injury, spotlighted by the Orioles' questionable infield defense, would be a major blow to a Baltimore club playing without Manny Machado if Hardy were to miss extended time. He was already slated to take Monday morning's game off.

"Lot of guys get that kind of stuff at the start of the game, a cramp or whatever. That one didn't go away," manager Buck Showalter said of Hardy's injury. "It started working his way up a little higher. I didn't like that description."

Hardy entered the game hitting .244 with no homers and three RBIs. On Sunday, Ryan Flaherty shifted from third base to shortstop, with Lombardozzi taking over at second base and Jonathan Schoop moving from second to third.