of McGuinness as deputy First Minister, however, the party surged, winning 27.9% of the popular vote to 28.1% for the DUP, and 27 seats to the DUP's 28 in an Assembly reduced by 18 seats. The withdrawal of the DUP party whip from Jim Wells in May 2018 meant that Sinn Féin became the joint-largest party in the Assembly alongside the DUP, with 27 seats each. Republic of Ireland Dáil Éireann elections The party had five TDs elected in the 2002 Irish general election, an increase of four from the previous election. At the general election in 2007 the party had expectations of substantial gains, with poll predictions that they would gain five to ten seats. However, the party lost one of its seats to Fine Gael. Seán Crowe, who had topped the poll in Dublin South-West fell to fifth place, with his first preference vote reduced from 20.28% to 12.16%. On 26 November 2010, Pearse Doherty won a seat in the Donegal South-West by-election. It was the party's first by-election victory in the Republic of Ireland since 1925. After negotiations with the left-wing Independent TDs Finian McGrath and Maureen O'Sullivan, a Technical Group was formed in the Dáil to give its members more speaking time. In the 2011 Irish general election the party made significant gains. All its sitting TDs were returned, with Seán Crowe regaining the seat he had lost in 2007 in Dublin South-West. In addition to winning long-targeted seats such as Dublin Central and Dublin North-West, the party gained unexpected seats in Cork East and Sligo–North Leitrim. It ultimately won 14 seats, the best performance at the time for the party's current incarnation. The party went on to win three seats in the Seanad election which followed their success at the general election. In the 2016 election it made further gains, finishing with 23 seats and overtaking the Labour Party as the third-largest party in the Dáil It ran seven candidates in the Seanad election, all of whom were successful. The party achieved their greatest contemporary result in the 2020 Irish general election, topping the first-preference votes with 24.5% and winning 37 seats. Due to poor results in the 2019 local elections and elections to the European Parliament, the party ran only 42 candidates and did not compete in Cork North-West. The party achieved unexpected success in the early counting, with 27 candidates being elected on