After getting blown out in their last home game, Dream coach Michael Cooper knew his team had to find a way to beat one of his team’s biggest antagonist to maintain any realistic hope of earning a home-court advantage for the WNBA playoffs.

The Dream responded with more energy and hung on to beat the Phoenix Mercury 91-87 on Tuesday at Philips Arena, turning back a team that had won six of the past seven meetings.

The win pulled Atlanta (15-14) within a half game of idle Chicago (15-13) for the fourth playoff spot.

“Our job is still to make the playoffs, try to get that fourth slot, but right now it’s just getting to the playoffs and this is a big win to start that,” Cooper said.

The Dream appeared to have this one put away when they led 78-69 on Layshia Clarendon’s driving layup. But the more-experienced Mercury pecked away and twice cut the lead to one point, the last time when Diana Taurasi made two free throws with 38.4 seconds to make it 86-85.

After calling timeout, the Dream’s Tiffany Hayes drove to the basket and converted a three-point play. She later made a pair of free throws to ice the game with 15.8 seconds left. Hayes finished with 14 points, eight in the second half.

“To build the lead and get to that point, we can’t stop doing the things that got us there,” Cooper said. “I think sometimes we stop doing the things that got us the lead or got us back in the game. That’s what I said — keep being aggressive offensively, stay with our defensive principles and do what we’re supposed to do. Do that and we can win some games.”

Atlanta was led by Angel McCoughtry, who followed up her seas0n-high 32-point effort on Sunday with 27 points and eight rebounds against Phoenix. Bria Holmes added 18 points and six rebounds and Elizabeth Williams scored 12 points.

Phoenix (13-17) got 23 points from Taurasi and 21 points, five rebounds and six blocks from Brittney Griner. Candice Dupree scored 19 and DeWanna Bonner added 10 for the Mercury.

Cooper said the loss on Sunday was a wakeup for his team, which has only five games remaining. The Dream hits the road to play at Los Angeles on Thursday and at Phoenix on Sunday.

“That game (against Seattle on Sunday) really let us know we have to keep our focus and we have to come and play with energy every single game. When we do that we’re one of the best teams in the league.”

The Dream used a 6-0 run at the end of the first period to take a 27-20 lead, with McCoughtry scoring 11 in the quarter.

The streak spilled over to the second period and the Dream extended the lead to 31-20 on a layup by Clarendon with 7:38 left. The Dream pushed lead to 12 points a couple of times and were ahead 42-34 at halftime. McCoughtry had 16 at the half and Holmes had 12. Phoenix stayed in the game behind Taurasi, with the veteran scoring 13.