The Phillies said Harper was being evaluated. Manager Rob Thomson said Harper was day-to-day.
Harper was originally credited with an error on a grounder by Dominic Smith in the fourth inning when he went to field a ball that hit the first base bag, then bounced off his chest. The play was later scored as a hit.
After Harper reached for the loose ball, television replays showed him trying to flex his legs and shoulders in an attempt to loosen his back. He stayed in the game before being pulled during the top of the fifth inning.
"I was just told by the trainers between innings that it had stiffened up and I said, 'That's it,'" Thomson said.
Harper was playing his 12th game at first base after starting 70 games at designated hitter following offseason Tommy John surgery that limited him to just eight games in right field in 2022. He had not previously played the infield after 1,446 games as an outfielder or designated hitter.
Harper is hitting .293 with seven homers and 38 RBI. He was replaced at first base by Alec Bohm, who has received the majority of Philadelphia's starts at the position in place of Rhys Hoskins, who was lost late in spring training with a left anterior cruciate ligament tear.