This one was right there for the taking and the Phillies did not take it.

Down a run in the bottom of the eighth inning Sunday afternoon, the Phils had runners on the corners with no outs.

What’s brewin’? A game-tying run? Perhaps a go-ahead rally?

How ‘bout neither.

Your thoughts, please, Bryce Harper.

“Just bad baseball,” he said. “We had an opportunity right there and didn’t do the things we needed to do to come through in that situation.”

And, so, a mostly happy day, one that included sunny skies, a packed house of 43,060 on the Phanatic’s birthday and a late Phillies’ lead, ended with a demoralizing 4-3 loss to the Arizona Diamondbacks.

“Yeah, tough one,” acknowledged Trea Turner. “You’ve got to tip your cap. They made some plays and we didn’t at the end.”

The biggest plays that the Diamondbacks made came in the eighth inning. First, they rallied for two runs against Jose Alvarado in the top of the inning to erase a one-run deficit. Then they put up a zero in the bottom of the inning after the Phillies put runners on first and third with no outs.

Down a run, Harper drew a four-pitch walk to lead off the frame. Brandon Marsh then singled, moving Harper to third. With the game on the line, reliever Kevin Ginkel struck out Bryson Stott on breaking stuff. Then reliever Ryan Thompson came on and induced an infield popup from Adolis Garcia. Marsh, running on the pitch, never looked in to pick up the ball. He made it to second base and was doubled up at first to end the threat.

It was the second time in the game that the Phils had runners on first and third with no outs and got nothing. It also happened in the sixth inning after the Phils had scored three runs on four no-out extra-base hits — doubles by Justin Crawford, Kyle Schwarber and Harper and a two-run homer by Turner. Stott, Garcia and Alec Bohm all came up short in that situation with Harper getting intentionally caught between home and third on a ground ball in order to stay out of a double play.

“Obviously, you want those situations to come up,” Harper said. “When you don’t come through in those situations it’s tough as a team, but we have to do it. We have to come through in those situations especially with no outs. We have to be better.”

Harper himself made a blunder in the fourth inning when he ran into an out trying to stretch a single into a double with no outs and his team down 1-0.

“He’s pretty aggressive,” manager Rob Thomson said.

Too aggressive on that play.

“I feel like most of the balls I hit in that spot I try to get there,” Harper explained. “I thought it was a good point in the game. We hadn’t had anything going all day. They made a good throw and got me.”

Ultimately, the baserunning miscue that hurt most was Marsh getting doubled up on Garcia’s one-out popup in the eighth, which dropped him to 0 for his last 11. Marsh was off on the pitch but did not look in to pick up the ball. He would have had plenty of time to get back to first had he looked for the ball. Marsh was not available for comment after the game.

“He lost the ball,” Thomson said. “I haven’t looked at the tape. The third step, you should peek. He lost the ball. It was a 3-1 count and they were giving us second base. They were also in double-play depth so if the ball is on the ground we score and tie the game. That’s the way it is.”

That’s the way it is a little too often for this team, which is now 7-8, and hasn’t scored in more than one inning in four of the last six games. They were shut out in the other two games.

“I think our lineup is great,” Turner said. “We’ve got great players up and down. Sometimes – and I’m guilty of this, too – you’re just trying too hard in those situations. You know it’s kind of a freebie. All you have to do is hit a fly ball to center field or move a guy over. Sometimes it doesn’t happen and it’s really obvious looking back at situations that could change a game. We understand them. We know what we’re trying to do, but it doesn’t always happen and I think that’s the difference in some of these wins and losses lately. I think we’re pitching pretty well and playing good defense. It’s just the timely hitting — moving guys, the sac flies, simple things — and that can change in a hurry.”

Turner’s two-run homer in the sixth fueled a three-run rally that gave rookie Andrew Painter a one-run lead and briefly put him in position for a win on a day that started with a migraine that caused him to be scratched from his scheduled start. Painter spent the morning vomiting, he said. He was scratched about 45 minutes before first pitch, but felt well enough to take a seat in the bullpen by first pitch and was in the game in the third. He ended up pitching five innings of one-run ball. He scattered three hits, walked one and struck out seven.

Not bad for the kind of morning he had.

“Great outing,” Thomson said.

Painter has a history of migraines, but had never missed a start before. He didn’t really miss this one; he just arrived late.

“I wasn’t going to go out there if I didn’t feel good,” he said. “I wanted to eat some innings for (the bullpen). I wanted to show up for them. Once I was in the game, I was fine.