Dame Judi Dench says her husband convinced her to play M in the James Bond franchise so he could ''live with a Bond woman''.

The 84-year-old actress portrayed the MI6 chief in seven 007 films before her character met her end in 2012's 'Skyfall', and she has admitted that although she didn't know much about the role before taking it on she accepted as her husband Michael Williams - who passed away in 2001 at the age of 65 - was ''mad keen'' for her to play the character.

She is quoted by the Daily Star newspaper as saying: ''I didn't know anything about M. I just thought the writing was really witty. My husband was mad keen that I should do it, so he could say he lived with a Bond woman.''

Judi has daughter Finty Williams, 47, with her late spouse and her actress daughter has a son Sam Williams, now 21.

The 'Red Joan' star went on to explain that it wasn't just her husband who loved her playing M, her grandson was also very impressed and Judi would often tease her grandson's friends by threatening to ''lock them up''.

The legendary thespian - who appeared opposite Daniel Craig as 007 in three movies - said: ''It went down so well with my grandson's friends. These little boys would come and you'd see them look ...'Yes it's me! One step out of line and I'll have you locked up!' ''

Judi added that her daughter Finty was once able to meet Pierce Brosnan - who played the suave spy in four films beginning in 1995's 'Goldeneye' - and was so star-struck she ''turned to rubber''.

She said: ''My daughter got to meet Pierce Brosnan and I've never, ever seen a reaction like it. Everything turned to rubber.''