Labour's Patrick Nulty has been elected in the Dublin West by-election after beating Fianna Fáil's David McGuinness to the seat.

Mr Nulty finished on a total of 17,636 votes, with Mr McGuinness on 11,590.

The by-election went to a fifth count following the elimination of Socialist Party candidate Ruth Coppinger.

Ms Coppinger and Mr McGuinness finished tied on 9,873 each after a rechecking of votes.

The Socialist Party had asked for a recount after she was found to be just 18 votes behind the Fianna Fáil candidate.

The recheck found errors in the transfer process bringing Ms Coppinger level.

But after consultation with both parties, returning officer John Fitzpatrick said he was eliminating Ms Coppinger under Section 122 of the Electoral Act, which means the person with the highest first preference vote goes through.

The by-election was to fill the seat left by the death of former Fianna Fáil Finance Minister Brian Lenihan.