The Crown says the man accused of murdering a Whanganui woman developed a story to blame someone else and save his marriage.
Dean Mulligan, 43, told police that a man with a knife raped him to force him into a relationship with Marice McGregor.
He said Ms McGregor later forced him into sex at knifepoint. After her killing, the man again raped him and threatened him into a false confession.
He told the High Court at Whanganui that he was also threatened at gunpoint, and that he received a note in prison sexually threatening his wife and daughters.
Crown prosecutor Lance Rowe says Mr Mulligan made it all up to paint the betrayal of his wife with a woman he later killed, as someone else's fault.