LONDON (Reuters) - Britain’s UKIP party, widely credited as having been a major factor behind the country’s decision to leave the European Union, lost its only lawmaker on Saturday when Douglas Carswell announced he was leaving the party.

Slideshow ( 5 images )

Carswell, 46, defected to UKIP from the Conservative party led by then Prime Minister David Cameron in August 2014 and went on to win a by-election in the eastern seaside town of Clacton that year.

“Like many of you, I switched to UKIP because I desperately wanted us to leave the EU,” he said in a statement. “Now we can be certain that that is going to happen, I have decided that I will be leaving UKIP.”

“I will leave UKIP amicably, cheerfully and in the knowledge that we won.”

He said he would remain as Member of Parliament (MP) for Clacton, as an independent, until the next general election due in 2020.

Carswell’s announcement comes just four days before Britain’s Prime Minister Theresa May formally triggers the EU divorce process, following last June’s referendum vote to quit the bloc that Britain joined 44 years ago.

The party’s best-known politician Nigel Farage held a long-running feud with Carswell over party policies and he had previously accused Carswell of trying to split the party.

The defection will raise questions within UKIP as the party hopes to capitalize on its successful campaign to leave the EU.

After months of turmoil following Farage’s decision to step down as leader last June, it had finally elected its former chairman Paul Nuttall as leader in November and was aiming to increase its representation in the 650-seat parliament.

Nuttall failed however in his bid in February to win a by-election in Stoke, central England, which was one of the most solidly pro-Brexit areas on England in the referendum.

In a statement, Nuttall said: “Douglas was genuinely committed to Brexit but was never a comfortable Ukipper.”

“Our party has not benefited financially or organizationally from having Douglas in Westminster. His departure will make no difference to my ability or focus on delivering the reforms I promised when elected as leader.”