THE result wasn’t what Edinburgh were after, with a mid-match slump ultimately leaving them with too much of a mountain to climb, but head coach Richard Cockerill was happy with what he had seen and from a broader Scottish perspective it was a relief that the two British and Irish Lions in the home line-up emerged unscathed.

There was a scare midway through the second half when Duhan van der Merwe received treatment for a leg injury, but Cockerill said it was just cramp, and the winger was replaced a few minutes later.

Meanwhile, Hamish Watson lasted 74 minutes – minus a 10-minute spell in the sin-bin during the first half – before eventually coming off.

That pair, along with prop Rory Sutherland – who is days away from being fit following his shoulder injury during the Six Nations – will travel to Jersey next Sunday to join the Lions camp ahead of their pre-tour match against Japan at Murrayfield on June 26.

“He [Duhan] is fine, there’s nothing wrong with him,” said Cockerill. “He had a bit of cramp because he’s obviously not played a huge amount in the last few weeks, so it was best just to get him off the field, but he’s 100 per cent and will be available to do whatever he needs to do.

“I’m really pleased with the performance. I thought we started really well. Then the two yellow cards were tough – Hamish Watson was actually trying to play the ball backwards and it came off his hand – and it took the referee a long time to get his yellow card out in the second half when we were camped on their line.”

Cockerill had words of praise for the three teenagers in his side – hooker Patrick Harrison, No.8 Ben Muncaster and full-back Harry Paterson – and added that he thought his team deserved the win.

“It was a show of character, the way we started but also the way we came back into the game,” he said. “I’m really pretty gutted – we could have won it, should have won it, then you end up with a last-minute penalty that costs you.”

The hosts dominated possession during the first five minutes and eventually managed to create enough space on the left for van der Merwe to charge home for his 32nd try for Edinburgh in his 67th appearance for the club, and remarkably his first this season.

That seemed to settle home nerves and four minutes later they extended their lead to 12 points when Jamie Ritchie fed James Johnstone on a wicked angle, and the centre timed his pass well to send Blair Kinghorn in for a try which the stand-off converted himself.

Almost straight from kick-off, Harrison and Watson carried hard to get the hosts right back on the front foot, but then an overthrown line-out allowed Ulster off the hook, and they took full advantage – sweeping the length of the field to create an excellent try scored by James Hume which sparked a major momentum shift. Watson was harshly sent to the sin-bin for a deliberate knock-on after a “captain’s challenge”, and Ulster turned the screw with Iain Henderson rumbling over two minutes later. Iain Madigan’s conversion edged the visitors into a two-point lead. To make matters worse for Edinburgh, WP Nel was sent to the sin-bin for collapsing the maul leading up to that score.

“Get rid of the captain’s challenge,” was Cockerill’s analysis. “It’s a disgraceful thing to use. All you’re doing is getting one team trying to ‘Judas’ the other team to get blokes sent off the field. There’s a TMO, a referee, assistant referees – it’s an absolute shambles. It ruins the game. The officials are there – are we saying we can’t trust the officials? Well, don’t have the referee, we’ll just ref it ourselves and it will be much better fun.”

The hosts initially responded well to being reduced to 13 men, monopolising possession for the next nine minutes, but they couldn’t sustain it and fell further behind when Ulster launched an attack from deep which exposed some tired tackling and culminated in Ian McCloskey touching down.

The bonus point was wrapped up by Ulster just before half time when hooker Adam McBurney – who will move to Edinburgh during the summer – peeled off a line-out drive and bustled over.

Kinghorn missed a long-range penalty early in the second half, and Edinburgh soon fell further behind when some slick inter-play saw Ulster full-back Rob Lyttle go in for try number five.

Edinburgh spent a long spell camped on Ulster’s line before eventually getting their reward when Pierre Schoeman barrelled over – at the third time of asking – after a succession of close-range tap penalties.

By this time Ulster were down to 13 men, with Michael Lowry sin-binned for playing the ball from an off-side position and Nick Timoney following him four minutes later for a no-arms tackle.

Edinburgh sensed they had a chance to salvage something and with just over five minutes to go, Cammy Hutchison marked his debut by motoring under the posts to set up a conversion which made it a five-point game.

Then, with just a few minutes to go, a sweeping attack sent Eroni Sau in for a try which squared it. There was a nervous wait as a “captain’s challenge” looked at whether there had been shoulder-on-head contact at a ruck earlier in the move. The video evidence showed there was, but Whitehouse ruled that there was nothing the Edinburgh player could have done different because Lowry had dipped just before contact.

Kinghorn missed the tricky conversion which left it all-square as the game moved into overtime, but then George Taylor committed a late tackle, and Madigan stepped forward to slot home from 40-odd yards out.

Scorers, Edinburgh – Tries: van der Merwe, Kinghorn, Schoeman, Hutchison, Sau. Cons: Kinghorn 3.

Ulster – Tries: Hume, Henderson, McCloskey, McBurney, Lyttle. Cons: Madigan 3. Pen: Madigan.

Edinburgh: H Paterson (N Chamberlain 71); E Sau, J Johnstone, G Taylor, D van der Merwe (S Berghan 27-31, C Hutchison 56); B Kinghorn, C Shiel (H Pyrgos 66); B Venter (P Schoeman 48), P Harrison (M Willemse 48), W Nel (S Berghan 48), M Sykes, B Toolis (M Kunavula 61), J Ritchie, H Watson (H Morris 73mins), B Muncaster.

Ulster: R Lyttle; M Faddes (M Lowry 40), J Hume, S McCloskey, C Gilroy; I Madigan (B Burns 40-66), D Shanahan (A Mathewson 66); K McCall (A Warwick 46), A McBurney (R Herring 46), M Moore (T O’Toole 46), A O’Connor (K Treadwell 60), I Henderson, Marcus Rea, Matthew Rea (G Jones 52), N Timoney.

Referee: Ben Whitehouse (Wales)