Luton Crown Court was told Sri Lankan Gnanachandran Balachandran, 38, kept Suren Sivananthan captive for 12 hours before beating him to death.
He snatched his "rival" from a Milton Keynes shopping centre, it was heard.
Mr Balachandran is in court with two men and a teenager he is said to have enlisted to help him. All four deny murder.
LIVE: Updates on this story and news from the area
The court heard Mr Sivananthan was staying with Mr Balachandran's wife in Milton Keynes while on a visit from Canada.
The jury heard that when she called Mr Sivananthan's phone, her husband answered and said: "Why are you asking where he is? You can't live with your husband and so you take someone else. You are a bad person.
"You will see what I do to him."
Mr Sivananthan, 32, who lived in Canada, was beaten to death by a parade of shops in Great Linford, the court heard.
He was found by police at about 04:00 GMT on 21 January.
The jury heard he had 39 separate injuries to his head and neck, plus bruises on his arms, legs, back and chest.
A post mortem showed he died from sustained blunt force trauma to the head, which resulted in a brain injury.
This was exacerbated by a high level of alcohol found in his body, the pathologist's report said.
Mr Balachandran was aided by Kiroraj Yogarajah, 30, of Milton Keynes, Prashanth Thevarasa, 24, also from Milton Keynes, and a 17-year-old, who cannot be named for legal reasons, the court heard.
The teenager also pleads not guilty to causing grievous bodily harm with intent.
The trial continues.
A jealous husband whose wife was planning to divorce him murdered the new man in her life, a jury heard.