Man-of-the-match Keith Earls was among the try scorers as Munster edged out Ulster 22-20 in a closely-fought Guinness Pro12 derby at Thomond Park.

The win confirmed a berth in the play-off semi-finals for Munster and builds further momentum ahead of next Saturday's Champions Cup last-four date with Saracens in Dublin.

However, injuries picked up by backs Darren Sweetnam and Rory Scannell will concern Rassie Erasmus, while on-loan scrum half Angus Lloyd and Ian Keatley were late replacements for Duncan Williams (tight groin) and a benched Tyler Bleyendaal.

Rory Best and Lloyd exchanged early tries and Ian Keatley matched Paddy Jackson's five points off the tee as the sides went in at the break tied at 10-10.

Jackson kicked a penalty and converted Luke Marshall's 64th-minute try for a 20-15 lead after Earls' score before Dave O'Callaghan rumbled over 10 minutes from time and Bleyendaal converted.

A last-ditch drop-goal attempt from Jackson that would have given Ulster victory was never on target.

Although their winless streak against Munster now stands at six matches, Ulster's losing bonus point - combined with the Ospreys' surprise defeat to Cardiff Blues - keeps them in the play-off hunt.

Ulster, who travel to the Ospreys in two weeks' time, opted to play into a swirling breeze and hit the front from their opening attack, hooker Best barging over from a lineout maul and Jackson converting.

Munster managed to respond within three minutes, Peter O'Mahony's right-wing break exposing Charles Piutau's defence and Earls and Lloyd provided timely support, the scrum-half evading two tackles to scramble over the try-line.

Keatley's well-struck conversion was cancelled out by a Jackson penalty from in front of the posts, but the Ulster fly-half failed to punish a Billy Holland high tackle with his next attempt.

Despite Munster failing foul of referee Marius Mitrea's whistle, the visitors were thwarted from two attempted mauls and Luke Marshall, who broke dangerously from halfway, was a pass away from putting Ruan Pienaar through.

The men in red bossed the latter stages of the first half, Ulster errors inviting them forward and Keatley's 36th-minute scrum penalty drew them. Dave Kilcoyne was just held up soon after.

Munster had nothing to show for some late scrum pressure before the interval, and eager Ulster full-back Jacob Stockdale had a try ruled out for Marshall's forward pass.

Pienaar's precise delivery had his captain Andrew Trimble threatening the Munster line, Jackson following up with a successful 52nd-minute penalty for 13-10.

Into the final quarter, Francis Saili's dancing feet saw him step past Trimble and Jackson and feed Earls who finished with aplomb, rolling over the line with Bleyendaal unable to convert.

Stuart McCloskey made a big impact off Ulster's bench, his big carry getting them into scoring range and with Saili shooting up out of the line, Marshall broke onto Jackson's invitingly flat pass to claim a seven-pointer to the right of the posts.

Scannell's injury-enforced departure meant that reserve hooker Rhys Marshall had to come on, but Munster's canny knack of winning tight games came to the fore again as they mauled up close before Abrie

Griesel's short pass put fellow replacement O'Callaghan over for the match-winning score, converted by Bleyendaal.