Robin Garbutt was struggling with £30,000 credit card debts and had been taking money from Melsonby Post Office, near Richmond, when he snapped and killed his wife Diana, 40, as she slept, Teesside Crown Court heard.
The 45-year-old told police he was held-up at gunpoint by an intruder in the shop, at around 8.30am on March 23 last year, who forced him to open the safe. After the robber fled, he went upstairs and found her battered to death, he claimed.
He denies murder.
David Hatton QC, prosecuting, said: “The prosecution maintain the defendant murdered his wife.
“Only two people knew what their relationship was really like and one of them is dead.
“Behind the facade of a happy and financially comfortable couple there were problems and all was not as it might have appeared on the surface to the public eye.
“Diana Garbutt had been unfaithful.”
She told Garbutt she had sex with a man at a party in York in December 2008 while her husband slept upstairs, Mr Hatton said.
She kissed a cousin’s husband at a family party and a note she wrote to him suggested a sexual relationship had happened, the court heard.
Mrs Garbutt used internet dating sites and had a flirtatious Facebook friendship with a local man with whom she went for late-night bike rides when her husband was asleep. She told the man her husband “wasn’t into sex” and they were going to see a therapist, the court heard.
Mr Hatton added: “Their conversations on Facebook would have a sexual tone, telling each other what they would like to do to each other if they were alone together.”
The night before she died, Garbutt tried to buy £850 worth of stock from a cash and carry but the transaction was refused. The bank rang his wife.
Mr Hatton said: “The perception of the Melsonby villagers of a rosy and loving relationship was, say the prosecution, far from the full picture.
“Here was a man with increasing debt desperately trying not to outwardly fail in his business or his marriage.”
That night a neighbour spotted him walking on the village green with a bag.
Mr Hatton said: “Where could he go? He had nothing.
“He returned. The pressure, tension and ill-feeling erupted in extreme violence in which he killed his wife.”
Mr Hatton said: “There were no intruders in that village post office at that very busy time that spring morning.
“The defendant killed his wife in the early hours.
“At 8.31am he commenced to open the safe.
“There was, as he knew, little money, if any, in it.
“It had been used by him.”
The night before, the couple ate fish and chips around 8.30pm and analysis shows her digestion stopped - with death - about six to eight hours later, the court heard.
Mr Hatton said: “One of the questions you will have to consider, if you accept this evidence, is the likelihood of a robber or robbers being prepared to violently kill a female sleeping in her own bed - at all - but then, having done so, to wait for four to six hours before going downstairs to rob the post office.
“And then, it has to be said, having been prepared to bludgeon the lady to death upstairs and wait for that length of time, to leave the defendant himself unharmed and unrestrained to raise the alarm.”
When paramedics arrived to treat Mrs Garbutt they found rigor mortis had set in, and they detected hypostasis - blood pooling in tissue after the heart has stopped.
Garbutt reported a £10,000 robbery at the post office almost exactly a year before, the court heard, but no witnesses saw anything and no arrests were made.
The defendant had racked up £30,000 of debts on his credit cards, the court heard.
Mr Hatton said the shop provided a “relatively modest income”.
He added: “An audit of the accounts has revealed large sums of cash were being transferred into the defendant’s current account, posted by special delivery.
“Notwithstanding that, it was still overdrawn.
“Where was this cash coming from? Not, we suggest from the shop taking having regard to its modest takings.”
Any significant discrepancy in the post office cash holdings would come to light as a relief postmistress was due to cover for the couple while they went on holiday to the US, he said.
The trial, expected to last four weeks, continues.