The leader of the Scottish arm of Britain's Labour Party is stepping down after the party lost almost all of its seats to Scottish nationalists in the general election last week.

Jim Murphy was one of 40 Labour lawmakers who lost their seats in Parliament to the pro-independence Scottish National Party, which swept all but three of Scotland's 59 seats in the U.K.'s Parliament in London.

Labour ended up keeping just one seat in Scotland in the election, which saw Prime Minister David Cameron's Conservatives win a majority of the votes.

The 47-year-old Murphy said Saturday he would put in his resignation next month so a successor could be in place by the summer. Murphy became leader of Scottish Labour just five months ago.