Miliband was grilled repeatedly on the BBC's Question Time about whether he would deal with Nicola Sturgeon to form a coalition or a minority government in the days after next week's election.
"We're not going to do a deal with the Scottish National party," he said. "We're not going to have a coalition. If it meant that we weren't going to be in government, not doing a deal, not being in a coalition, then so be it."
Moderator David Dimbleby then pushed Miliband to clarify the specifics, saying, "You'd rather lose office?"
"If the price of having a Labour government was a coalition or a deal with the Scottish National party, it's not going to happen," he replied.
"Does that rule out a future Labour government, because you're not going to win the most seats in the UK?"
It was pointed out by many people that it might not need to be an explicit deal, since the SNP would surely let Labour form a government rather than let the Tories back in.
But Ed seemed to be sticking to his guns.
Mark Di Stefano is a media and politics correspondent for BuzzFeed News and is based in London.
Contact Mark Di Stefano at email@example.com.
Got a confidential tip? Submit it here.