When asked whether he would contemplate a scenario where Britain failed to strike an arrangement with the rest of the bloc, Corbyn said: "There's going to be a deal. We will make sure there is a deal".
May and Corbyn faced tough questions and a sceptical audience in the live TV event which aired policy and stylistic differences between the two foes.
Facing harsh questioning from Jeremy Paxman, May defended her about-face on Brexit. She rebuffed his repeated attempts to get her to say whether she now thinks leaving the European Union is a good idea, saying only that the British voters have decided and that she is determined to get the best deal possible.
"We are doing the right thing in making a success of Brexit," she said, vowing to maintain her reputation as a "bloody difficult woman" during talks with European Union leaders if her party wins the election and keeps power.
But Paxman set the tone by saying that if he were an EU negotiator who had observed all her recent flip flops, he would think of her as a "blowhard who collapses at the first sound of gunfire".
May often found herself on the defensive as audience members grilled her on cuts to the police, National Health Service and education, and a so-called "dementia tax" that might make it harder for elderly Britons to pass on their property to their heirs.
At one point a heckler yelled, "You've clearly failed".
Corbyn did not enjoy smooth sailing either, with Paxman making numerous accusations and typically cutting Corbyn off before he could reply.
Paxman challenged Corbyn's refusal to denounce the Irish Republican Army and his having met with Hamas officials and suggested the Labour leader would seek to abolish the monarchy if his party triumphed.
Corbyn said getting rid of Britain's constitutional monarchy is "certainly not on my agenda".
He said he was fighting the election for "social justice" and to reduce poverty, not to change the law regarding the monarch.
- Reuters, AAP, AP