Aberdeen U18s suffered a second defeat in a row on the road when they lost narrowly at the Oriam in the game they will feel they should have taken something from.
Aberdeen started on the front foot, Alfie Stewart having a powerful shot which was blocked. A minute later the young Dons should have taken the lead when Stewart's inswinging free kick caused the Hearts defence problems but Findlay Marshall was just unable to get a touch.
On five minutes the visitors took the lead.
An excellent ball over the top from Brendan Hamilton down the left channel and Liam Harvey managed to get to the ball ahead of the onrushing keeper. The striker did well to gather the it, steady himself before lifting the ball into the empty net.
But Hearts hit back after 11 minutes.
Hearts striker Ryan Duncan was given time on the ball about 16 yards out and his shot managed to find the net. The home side almost went ahead a couple of minutes later, Callum Hambrook going very close, and then he had a second attempt which appeared to come back off the post.
Back came Aberdeen. Adam Emslie had a chance but his shot was blocked. At the other end Blessing Oluyemi made a good stop when he tipped a deflected shot just round the post. The keeper then saved a drive from Duncan and then Hearts missed a great chance when after a good passing move Hambrook found space inside the area but tried one pass too many.
Previous to that, on 20 minutes there was a collision between Liam Harvey and the keeper as the striker almost got on the end of another through ball. Liam tried to carry on but eventually had come off. He was replaced by Cammy Wilson on 38 minutes.
On 42 minutes Aberdeen regained the lead. A well worked free kick saw the ball headed back across goal by Blair McKenzie. Lewis Pirie also got a flick on and substitute Wilson headed home at the back post.
However, again frustratingly the young Dons could not hold onto the lead. On 45 minutes the ball was knocked in from the right wing and Duncan was again well position to fire home.
Half time: Heart of Midlothian 2 Aberdeen 2
Things then got even worse at the start of the second half. From a corner the ball fell to MacKenzie Ross and the striker swept a first time shot into net.
Aberdeen then almost equalised immediately, Marshall did brilliantly to create the opening inside the area but with just the keeper to beat he lifted the ball over the bar.
For the next 20 minutes or so, Aberdeen had a lot of possession whilst Hearts looked to hit on the break.
On the hour mark Dylan Lobban was desperately unlucky to see his effort from 20 yards thump off the bar. It was a brilliant striker from the skipper who had a very good game. A few minutes later Pirie was taken down on the edge of the area and Lobban went close again but his free kick.
As Aberdeen continued to throw bodies forward in an attempt to get back into the game, Hearts produced a good break which found Ross in space in a central area and the striker produced a cool finish to chip the ball over Oluyemi. 4-2 and it looked like game over.
However, with ten minutes to go the young Dons had a lifeline. A Hamilton cross from the left was knocked down by McKenzie and Lewis Pirie produced a brilliant finish on the turn.
Scott Anderson's side then threw the kitchen sink at Hearts in the final ten minutes. Alfie Stewart had a shot which went inches wide. They also won a number of free kicks and corners but credit to the young Hearts backline who managed to hold out during five minutes of injury time.
The 18s need to pick themselves up again quickly as they play Hamilton Accies on Tuesday at Cormack Park.
Heart of Midlothian Teamsheet
Cowie, 2 Rocco Friel, 4 Matthew Gillies, 6 Gregor Crookston, Hambrook, Chisholm, Ross, Duncan, Anderson, Nair, Walker
Unused Substitutes: Paris, Selfridge, Osborne, Hogarth, Burn, Muirhead, Plesiewicz
Aberdeen Teamsheet Oluyemi
.Unused Subs: Murray, Fatona, Kondolo, Mercer, Boyd, Smilie.Bookings: Pirie
Venue: Oriam, Edinburgh
Referee: Andrew Brown