One day, young detective Cordelia Gray walks into the office she shares with detective Bernie Pryde to find her partner dead. He slashed his wrist after finding out he had cancer, and has left everything, including his illegal gun, to Cordelia. With a failing detective agency in her possession and no money, her choices are limited. Rather than go back to her former secretarial job, Cordelia decides to keep the agency in memory of Bernie. Ironically, soon after Bernie's death she has a high profile client come see her. The woman, Elizabeth Leaming, works for Sir Ronald and comes to hire her on his behalf to look into the suicide of his son, Mark Callender.
Cordelia goes to Cambridge where the young man lived and studied at the prestigious university. She meets Mark's friends and immediately realizes they all share some dark secret. They are reluctant to talk to her, and attempt to convince her that Mark's suicide was just that, so that no further investigation is needed. She manages to get them to tell her where Mark was living, and she goes visit the place.
Mark Callender had left the University in spite of having decent grades and a promising future, including the prospect of a rather large inheritance from his maternal grandfather. He had then taken a job as a gardener for another rich family near Cambridge, and was living in a small cottage on the property. Cordelia immediately falls in love with the rundown cottage, and decides to move in there herself for the length of her investigation. The better she understands what kind of person the dead man had been, the more connected she feels to him, and the more convinced that his death could not have been suicide.
Repeatedly, Mark's friends try to seduce her away from the investigation but Cordelia holds on, determined to succeed in her first solo case. She returns to the cottage one night to find hanging from the same hook on which Mark had been found hanging a pillow in a grotesque imitation of the corpse. However, Cordelia refuses to be frightened away, now sure that foul play is involved. She obtains pictures of the corpse, and realizes that what the photos show is something Mark could not have done to himself. With this concrete evidence of murder, Cordelia sets out to track down the murderer.
She finds out that a certain Nanny Pilbeam attended Mark's cremation and left a rather particular wreath. She investigates all the florists in Cambridge until she finds the one where it was commissioned and obtains Nanny Pilbeam's address. The old woman, who used to be Mark's mother's Nanny, confides in her and tells her that she went to see Mark in his dorm at Cambridge and gave him a prayer book his mother had wanted him to have when he turned 21, a prayer book that Cordelia has already noticed among Mark's books at the cottage. There was a note as well, but Cordelia guesses correctly that it was destroyed. However, she also guesses where to look in the prayer book, the order of service for St. Mark's day. There, in the margin, she finds Mark's mother's initials, and the letters "A A" written side by side, and realizes that this must be the mother's blood group. She succeeds in establishing that Sir Ronald Callender's blood group is A, meaning that he can't be Mark's father.
Returning to the cottage late the following night, Cordelia is attacked by someone who throws her down the well and replaces the cover in an attempt to kill her. She is saved by a combination of her own courage and determination, and good luck that the owner of the cottage investigates the well because of a misplaced coil of rope. Cordelia in turn lies in wait with her gun to ambush her would-be killer, who turns out to be Sir Ronald's lab assistant Lunn, when he returns to finish her off. Lunn, however, succeeds in eluding Cordelia and escaping in his van, only to get himself killed by colliding with a truck. Certain now of her case, Cordelia continues to Sir Ronald's house where Miss Leaming lets her in and takes her gun from her. Cordelia accuses him of the murder of his son, which he eventually admits to, sure that nothing can be proved. Miss Leaming, however, overhears him, enters the office and shoots him with Cordelia's gun while Cordelia makes no attempt to prevent it.
She confesses to Cordelia that she was Mark's mother and that she loved him in spite of not being allowed to by Sir Ronald. Lady Callender had been rich and fallen in love with Sir Ronald before he was knighted for his scientific achievements. Her father however, deeply disapproved of him and refused them any money in spite of his huge fortune. However, he also desperately wanted a grandson. He decided he would give money to his daughter only if she managed to produce this grandson. Sadly, Lady Callender was infertile and sickly. Sir Ronald however, had produced children with some of his many lovers and when Miss Leaming became pregnant by him, the three of them left for Italy where she passed as Lady Callender and submissive Lady Callender for Miss Leaming. After Miss Leaming had the child, they went back to England where they pretended the child was Lady Callender's.
Cordelia sympathizes with Miss Leaming and the two, in spite of not liking each other, come up with a story to protect Miss Leaming from the police. Cordelia arranges the crime scene to look like a suicide, using eveything Bernie Pryde had taught her to make is so authentic that the local police appear to believe it and the two women go free. The case is, however, referred to Chief Superintendent Dalgleish of Scotland Yard (the protagonist of most of P. D. James's murder mysteries), and Cordelia is called in for questioning. She admits nothing, and although Dalgleish has worked out what must have happened, he has no evidence on which to prosecute her. The irony is that it was he who had trained Bernie Pryde when he was with the CID, and it is what Cordelia in turn had learned from Bernie that had allowed her both to solve Mark's murder, and to outwit the police over Sir Ronald's.