Ukip's Nigel Farage has revealed he felt he "owed it" to the party to stay on as leader when the national executive committee rejected his resignation.
In a first-person piece written forThe Telegraph, he said he felt there were "huge battles about to take place", adding that he had to put the country's interests first and foremost - as well as honour the wishes of the party's members.
Ukip will focus on electorial reform, he said, highlighting the four million votes they won - returning just one MP to Parliament - compared to the 56 SNP MPs elected on just 1.4 million votes between them.
And the major issue on the horizon, he added, was the promised referendum on Britain's membership of the EU.
As much as I wanted to spend the summer fishing, walking, and of course, in the European Parliament where all hell is currently breaking loose – that I owed it to the party that got me here.
There are some huge battles about to take place, and as much as I had thought that taking at least the summer off was in my best interests, I realise now that the party comes before me, and indeed, that this country comes before both.
With a European Referendum potentially on the horizon, I feel the need to stay involved for just a little bit longer, to add my voice to those who want Britain to be a country that trades and deals with the world, rather than ties itself to a post-WWII mind set about Europe and the political union.
Have I done the right thing by my party and my country? I think so. And I’m sure many people will have their opinions on the matter. All I can say is that I’m ready for the challenges ahead.
The fight starts here.
Senior Ukip members have welcomed Nigel Farage's decision to stay on as party leader, after the national executive committee rejected his resignation.
Deputy chairman of the party, Suzanne Evans, had been tipped to stand in until a leadership contest in the autumn - but she took to Twitter to assure followers she was among those who helped persuade Mr Farage to stay.
Very pleased @nigel_farage still at the helm. As stated previously, I tried to persuade him to stay and was never actually appointed leader!
It comes after a statement by party chairman Steve Crowther was released, explaining that the committee had rejected the resignation on the basis that Ukip members did not want Mr Farage to leave and labelling the election campaign a "great success".
Nigel Farage remains the leader of Ukip after his resignation was rejected by the party's national executive committee, Ukip has said in a statement.
Ukip chairman Steve Crowther said the committee (NEC) had produced "overwhelming evidence" that members of the party did not want him to go, saying they believed the general election campaign had been "a great success".
He said Mr Farage had been "persuaded" by the committee to withdraw his resignation.
We have fought a positive campaign with a very good manifesto and despite relentless, negative attacks and an astonishing last minute swing to the Conservatives over fear of the SNP. In these circumstances, four million votes was an extraordinary achievement.
On that basis Mr Farage withdrew his resignation and will remain leader of Ukip.
In addition, the NEC recognised that the referendum campaign has already begun this week and we need our best team to fight that campaign led by Nigel.
He has therefore been persuaded by the NEC to withdraw his resignation and remains leader of Ukip.
Mr Farage had announced before the election that he would resign if he was not voted into his chosen constituency of South Thanet - and he duly did so on Friday afternoon.
However, he had kept the option of returning open by hinting he might compete in the leadership race in the autumn.
Nigel Farage has repeated his attack on the first-past-the-post voting system, saying he felt the 3.8 million voters who backed Ukip should be better represented.
Writing in the Independent,he said: "It is my view that the first-past-the-post system is now totally bankrupt. It has turned general election campaigns into "please vote for me, I'm not quite as ugly as the other one" situations, rather than parties fighting over policy positions and serious issues. It has directly led to a campaign of total negativity and triviality.
Mr Farage also said he would "think seriously" about his next move, and hinted he wanted to play a role in an referendum on the EU.
He said: "I say that, though it nags in the back of my mind that this majority Conservative government has promised a referendum on Britain's EU membership. I guess I face some tough decisions."
Ukip's only sitting MP, Douglas Carswell, has ruled himself out of the race to be the party's next leader.
Mr Carswell, who held his Clacton seat on a reduced majority, said he would not seek to fill the post vacated by Nigel Farage, who announced his resignation after losing out in Thanet South.
Mr Farage said he was taking a break but left the door open for a return when the party elects a new leader in September while endorsing Suzanne Evans, the deputy chairman, to be a stand-in until the leadership challenge is complete.
Mr Carswell praised Mr Farage, the man behind his defection from the Conservatives, as a "heroic and inspirational figure" but told the Times (£): "I am not going to be running as leader."
Nigel Farage has confirmed he will stand down as leader of Ukip, however he said that after a summer off he may well consider running for leader again.
I said as this campaign went on that if I didn't win I would stand down as leader of Ukip.
I am a man of my word, I don't break my word. So I shall be writing to the Ukip national executive in the next few minutes saying that I am standing down as leader of Ukip.
I intend to take the summer off, enjoy myself a little bit not do very much politics at all. There will be a leadership election for the next leader of Ukip in September and I will consider over the course of this summer whether to put my name forward to do that job again.
Farage said he was professionally disappointed, but personally relieved after failing to become an MP as his party had just one success.Read the full story ›
Ukip leader Nigel Farage has been beaten by the Conservative's Craig Mackinlay in South Thanet, much to the surprise of their fellow candidate 'the Pub Landlord' Al Murray.
Ukip leader Nigel Farage has said a 'weight has been lifted' after he failed to secure a seat in Parliament.
There was an earthquake this election and it happened north of the border, it happened in Scotland. And I think what you saw were lot of voters so scared of that Labour SNP coalition that they shifted towards the Conservatives.
On a professional level I express today a degree of disappointment. On a personal level I feel an enormous weight has been lifted from my shoulders and I've never felt happier.