Douglas Luiz and Leon Bailey scored during more than a quarter of an hour of stoppage time as Aston Villa came from behind to beat Crystal Palace.
Substitute Jhon Duran equalised for Villa in the 87th minute after Odsonne Edouard had put Palace ahead two minutes into the second half.
But Villa then completed the turnaround during the added time.
Luiz converted from the penalty spot after a lengthy video assistant referee review when Ollie Watkins was brought down by Chris Richards, and Bailey turned in from close range as Palace threw bodies forward in pursuit of an equaliser of their own.
Palace were without manager Roy Hodgson in the dugout because of illness, with assistant Paddy McCarthy taking charge.
The win moved Villa up to seventh, two points ahead of eighth-placed Palace, who were denied a first triumph at Villa Park since 2013.
Persistence pays off for Villa
It appeared Villa were going to pay for their profligacy after Watkins spurned two big chances either side of half time – Sam Johnstone saving in the first period before he was denied by the post in the second.
Villa dominated possession in the opening 45 minutes but, Watkins’ opportunity aside, they struggled to break down a well-organised Palace backline.
Palace caught them cold soon after the restart and Mateta was the architect. He used his physicality to turn on the halfway line before bursting down the flank and delivering an early ball into the path of Edouard, who capitalised on a slip from goalkeeper Emiliano Martinez to coolly slot home for his fourth in the league this season.
Despite being without England international defender Marc Guehi and midfielder Jefferson Lerma because of injury, Palace appeared to be on track for a rare win at Villa Park, standing firm in the face of relentless pressure.
However, substitute Duran rifled home the equaliser in spectacular fashion to turn the game on its head and drag momentum back in Villa’s direction.
A desperate lunge from Richards saw Watkins fouled in the area and spot-kick specialist Luiz made no mistake from 12 yards to edge his side in front.
Bailey – another substitute – gave Villa some breathing space in the 101st minute when he was found in space by Moussa Diaby.
“We played a lot [of other matches] like today and were winning in the first 20 or so minutes,” Villa manager Unai Emery told BBC Match Of The Day.
“We said at half-time to keep going and controlling the game like we were doing. They have a very good team and good players and they did that transition and scored the goal. Then it was a difficult moment.
“We were playing more with our hearts than with our minds in the last 20 minutes and sometimes you need that. At the end we deserved to win. We scored three goals so I’m very happy because after their goal it was a difficult moment and we really reacted very well.”
Villa now turn their attention to the Europa Conference League with a trip to Polish club Legia to come on Thursday.
Palace relying heavily on Edouard
Hodgson returned for his second spell in charge of Palace in March and was key in steering the club clear of relegation, but they couldn’t rely on his pitchside instruction at Villa Park.
Palace confirmed shortly before kick-off that the 76-year-old “had taken ill” and that assistant McCarthy would take the reins alongside Ray Lewington.
It seemed as though Edouard was going to raise Hodgson’s spirits by delivering all three points but the Frenchman lacked support from others in attack when Palace had further chances to strengthen their lead.
Eberechi Eze was denied on two occasions by Villa goalkeeper Martinez, while Mateta struggled to have much impact after laying on the assist for the opener.
“I’m disappointed for the players – the gameplan worked for a large spell of the game, but I’m disappointed that we didn’t get anything from the game,” McCarthy said.
“The team shape and the effort were great. We knew it was going to be a tough side, but the boys who stepped in were great.
“The result just leaves a really bitter taste in our mouths.”
Edouard appears to be filling the void left by Wilfried Zaha, who departed for Galatasaray this summer, and has scored four of Palace’s six goals in the league this campaign.
The former Celtic striker has also surpassed his tally of three goals in the Premier League in 2022-23.
- 1E Martínez
- 2CashBooked at 86mins
- 14P Torres
- 44KamaraSubstituted forTielemansat 58′minutes
- 6Douglas Luiz
- 7McGinnBooked at 17minsSubstituted forDuránat 71′minutesBooked at 90mins
- 22ZanioloBooked at 45minsSubstituted forBaileyat 57′minutesBooked at 90mins
- 11WatkinsSubstituted forDendonckerat 90+10′minutes
- 2WardBooked at 90mins
- 28DoucouréSubstituted forRak-Sakyiat 90+10′minutes
- 19HughesBooked at 53mins
- 9J AyewSubstituted forMatetaat 25′minutes
- 10EzeBooked at 17mins
- 22ÉdouardSubstituted forAhamadaat 90′minutes
- Darren England
Match ends, Aston Villa 3, Crystal Palace 1.
Second Half ends, Aston Villa 3, Crystal Palace 1.
Jhon Durán (Aston Villa) is shown the yellow card for a bad foul.
Foul by Jhon Durán (Aston Villa).
Joachim Andersen (Crystal Palace) wins a free kick in the defensive half.
Leon Bailey (Aston Villa) is shown the yellow card.
Foul by Jhon Durán (Aston Villa).
Naouirou Ahamada (Crystal Palace) wins a free kick in the defensive half.
Foul by Lucas Digne (Aston Villa).
Jesurun Rak-Sakyi (Crystal Palace) wins a free kick on the right wing.
Goal! Aston Villa 3, Crystal Palace 1. Leon Bailey (Aston Villa) left footed shot from the centre of the box to the bottom right corner. Assisted by Moussa Diaby following a fast break.
Substitution, Aston Villa. Leander Dendoncker replaces Ollie Watkins.
Substitution, Crystal Palace. Jesurun Rak-Sakyi replaces Cheick Doucouré.
Joel Ward (Crystal Palace) is shown the yellow card.
Goal! Aston Villa 2, Crystal Palace 1. Douglas Luiz (Aston Villa) converts the penalty with a right footed shot to the centre of the goal.
VAR Decision: Penalty Aston Villa.
Penalty Aston Villa. Ollie Watkins draws a foul in the penalty area.
Penalty conceded by Chris Richards (Crystal Palace) after a foul in the penalty area.
Delay over. They are ready to continue.
Delay in match because of an injury Chris Richards (Crystal Palace).