Judi Dench receiving her Donostia from Alexander Payne Photo: Courtesy of San Sebastian Film Festival/Pablo Gomez
The actress was in the Spanish resort to accept a lifetime achievement Donostia Award and attend a screening of her latest film Red Joan.
The star recalled working with Spacey - who has faced a number of sexual conduct allegations, which he denies - on The Shipping News in the wake of the death of her actor husband Michael Williams.
She said: "I remember, just after my husband died and I was in a very bad way indeed. I went to Nova Scotia to do shipping News with Kevin Spacey and Kevin was an inestimable comfort and never mentioned that he knew I was in bad way but cheered me up and kept me going."
Asked what she thought of the situation he now finds himself in, she referred to Ridley Scott's decision to cut the actor's scenes from Getty kidnap drama All The Money In The World and replace him with Christopher Plummer.
"I can't approve in any way of the fact, whatever he has done, that you start to cut him out of films," she said. "Are we to do that throughout history. Are we to go back throughout history now and anyone who has misbehaved in any way or has broken the law, or has committed any kind of offence. Are they always going to be cut out? Are we going to exclude them from our history?
"I don't know about any of the conditions of it. But nevertheless he is and was a most wonderful actor, I can't imagine what he's doing now. And a good friend."
Dench plays Joan Stanley in Trevor Nunn's biopic of the British KGB spy, Red Joan, starring alongside Sophie Cookson, Tom Hughes and Stephen Campbell Moore. Despite her huge success on the big screen, he said she had always wanted to be a theatre actor rather in film and had "fulfilled that great dream".
She added: "I don't consider myself powerful at all. I just have to wait for someone to ask me to do a job and I'll do it. I've always called myself a 'jobbing actor' and 61 years after beginning, I still am a jobbing actor. I can't bear to turn a point down because I think I may not be asked again."
Red Joan is due for release in the UK next April.