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?"