Labour's Jonathan Ashworth has apologised to his party after criticising Jeremy Corbyn in a secret recording by his Tory activist friend.
In a recording leaked to Tory-supporting website Guido Fawkes, Mr Ashworth is heard saying he did not believe Labour would win the election.
He is also heard saying No 10 "will pretty quickly move to safeguard security" if Mr Corbyn were PM.
Mr Ashworth has insisted he was "joshing around" in the conversation.
The conversation appears to have been recorded over a week ago and Mr Ashworth said: "The reason this has come out today is because the Tories know the crisis in the NHS is ruining their campaign and we've got babies - babies - on the front page of the Daily Mirror unable to get a bed."
Mr Ashworth named the friend he was speaking to as former local Conservative Association chairman, Greig Baker, and he did not deny that he made the remarks.
Meanwhile, in an interview with BBC Breakfast, Mr Corbyn dismissed claims that he was a "problem on the doorstep" for Labour activists, saying it was "not a presidential election".
In the recording, Mr Ashworth appears to refer to an unsuccessful plot to oust Mr Corbyn, instigated by some of his MPs in the aftermath of the EU referendum.
"People like me were internally saying 'this isn't the right moment' but I got kind of ignored," Mr Ashworth is recorded as saying.
On Labour's election chances, Mr Ashworth is heard saying: "I've been going round these national places, it's dire for Labour… it's dire.
"I'm helping colleagues, banging on about the NHS for them but it's awful for them, and it's the combination of Corbyn and Brexit… outside of the city seats…it's abysmal out there…they can't stand Corbyn and they think Labour's blocked Brexit."
On the recording, Mr Ashworth is asked: If Mr Corbyn "got in would he be as bad as I suspect?"
"I don't know, on the security stuff, I worked in No 10, I think the machine will pretty quickly move to safeguard security, I mean the civil service machine. But it's not going to happen. I cannot see it happening."
Mr Ashworth told the BBC: "Of course it makes me look like a right plonker, but it's not what I mean when I'm winding up a friend, trying to sort of, pull his leg a bit."
He said he was "having a bit of banter" with his friend "because he was saying 'oh, the Tories are going to lose' and I was, like saying, 'no you're going to be fine', joshing as old friends do.
"And he's only gone and leaked it to a website - selectively leaked it - and I thought he was a friend, Greig Baker, but obviously he's not."
When asked if he believed, as the recording suggested, that Mr Corbyn was a threat to the UK's national security, Mr Ashworth replied: "Of course I don't."
Speaking to BBC Politics Live, he said: "I look like an idiot as a result of doing it... I apologise to Labour Party members."
Conservative Party leader Boris Johnson said Mr Ashworth was "saying what hundreds of Labour candidates and millions of voters are thinking", adding that Mr Corbyn was "unfit to be PM because he is blocking Brexit".
Mr Ashworth's remarks were "an honest and truly devastating assessment" of Mr Corbyn's leadership "by one of his most trusted election lieutenants", Conservative Party chairman James Cleverly said.
It's striking that in the dying embers of this campaign - which has been so carefully scripted and choreographed by the parties - suddenly events have burst into it and changed the dynamic.
Yesterday it was that photo of four-year-old Jack lying on a hospital floor. Today it's that recording of Jonathan Ashworth - by someone who was meant to be his friend.
They clearly knew his views of Jeremy Corbyn and basically it amounts to what looks like a sting - because the individual he was talking to is a Conservative activist.
Nevertheless, the remarks are out there and they are damning.
Here you have the man who is meant to be fronting Labour's attack on the NHS basically saying they haven't a hope of winning, that voters believe they blocked Brexit and they don't like Jeremy Corbyn.
And, perhaps most damning of all, seeming to suggest that Mr Corbyn is a risk to national security.
So this is absolutely going to dominate the headlines today.
Earlier, in an interview with BBC Breakfast, Mr Corbyn was challenged on his leadership credentials amid reports that some candidates are finding voters do not want to support him personally.
"It's not a presidential election," he said.
"It is a parliamentary election in which we elect members of Parliament. I'm the leader of the Labour Party and I'm very proud to have that position."
When asked about some candidates not including his name in their leaflets, he said he was "proud" of his party's manifesto and "my job is to deliver it".
On the case of a sick four-year-old boy who was photographed on the floor of Leeds General Infirmary, Mr Corbyn said it was an example of what was happening in the NHS.
"It is obviously awful for that little boy and the family, the way they were treated," he said.
"But it does say something about our NHS when this happened, and then all research shows there's a very large number of hospitals where patients are at risk because of staff shortages, because of a lack of equipment, because of poor maintenance of hospital buildings."
He insisted his spending plans "are completely credible" and will "give sufficient resources to the NHS".
In the interview, Mr Corbyn was also challenged on his party's Brexit policy and his own position.
Labour wants to negotiate a new deal with the EU and then put it to the public as a "credible Leave option" alongside the option of Remain in another referendum - which the Labour leader would remain neutral in.
"I will be the honest broker," Mr Corbyn said.
The Conservatives argue that Labour would bring further "dither and delay" to Brexit.
Follow election night on the BBC
- Watch the election night special with Huw Edwards from 21:55 GMT on BBC One, the BBC News Channel, iPlayer
- As polls close at 22:00, the BBC will publish an exit poll across all its platforms, including @bbcbreaking and @bbcpolitics
- The BBC News website and app will bring you live coverage and the latest analysis throughout the night
- We will feature results for every constituency as they come in with a postcode search, map and scoreboards
- Follow @bbcelection for every constituency result
- From 21:45 GMT, Jim Naughtie and Emma Barnett will host live election night coverage on BBC Radio 4, with BBC Radio 5 live joining for a simulcast from midnight