What is the difference between a guarantee and an indemnity?

Lord Justice Pearce in Yeoman Credit Ltd v Latter (1961) WLR 828, at p.830. said:

“In its widest sense a contract of indemnity includes a contract of guarantee. But in the more precise sense … a contract of indemnity differs from a guarantee. An indemnity is a contract by one party to keep the other harmless against loss, but a contract of guarantee is a contract to answer for the debt, default or miscarriage of another who is to be primarily responsible to the promisee.”

For a guarantee to be effective there must be an enforceable primary obligation because a guarantee (generally speaking) guarantees the performance of obligations owned by one¬†person to another. Whereas an indemnity doesn’t necessarily need a primary obligation. It looks to the loss suffered by a person notwithstanding whether another person is responsible for that loss.