A woman and two men are on trial for the murder of Gagandip Singh, 21. Photograph: Metropolitan police/PA

A medical student lured a television executive to his death after he tried to rape her, the Old Bailey has heard.

Mundill Mahil, 20, invited Gagandip Singh, 21, back to her home in Brighton six months after the attack and within hours, Singh lay dying in the boot of a Mercedes car which had been set alight, said Aftab Jafferjee QC, prosecuting.

He told the jury that two "gangster" friends of Mahil lay in wait for him, beat him unconscious, dumped him in the boot and drove to London where the fire was started.

Jafferjee said Singh and one of the accused, Harvinder Shoker, known as Ravi, were both "besotted" with Mahil who was described by all "as an intelligent and attractive young woman".

Singh was discovered after police came across the blue Mercedes on fire in Blackheath, south-east London, in February. He was the owner of a new broadcasting service called Sikh TV, and also helped in his family's successful packing business. His father was murdered while visiting India in September 2009, the court heard.

Jafferjee said Mahil and Singh had been friends when in 2009 she began a medical degree at Brighton and Sussex University. He said: "She offered him emotional support and friendship and spent considerable time with him, mainly on the phone or internet, often into the early hours.

"He wooed her with offers of gifts and then sadly, at the end of August 2010, he stayed the night in the house she shared with fellow female medical students.

"As the term had not begun, she was alone re-sitting an exam she had earlier failed.

"It is common ground in this case that he tried to have sex with her, by getting into her bed.

"Both she and he were to describe it as an attempted rape. In fact, her description of events to her friends suggests that it did not get as far as that because she forced him away – and he broke down in tears and left.

"She reacted both then and over time, in a way you would expect any young woman to react.

"She was extremely upset and angry at what she – with some justification – perceived as a great betrayal of trust."

Jafferjee said Shoker appeared in her life by this time and he was also besotted with Mahil. As the months wore on, Singh tried unsuccessfully to contact Mahil by bombarding her with texts and calls.

He had for some time been emotionally dependant on her, particularly after his father's murder. "Mahil was having none of it and was instead getting more overwrought by the fact he still wanted to see her," said Jafferjee.

Jafferjee said Mahil told her house mates that "certain of her male friends, who she referred to as 'gangster friends', wished to exact revenge", but she would discourage them. But by February this year things had changed.

"Far from discouraging anyone, she lured him to Brighton, suggesting a meeting at the same house at 11pm."

Singh had been both "highly excited and quite wary" at the late-night encounter following what had happened. He drove down in his sister's Mercedes because he had been having problems with his own car.

Jafferjee continued: "Lying in wait for him were Ravi and Peters. He had no idea what lay in store for him.

"He was attacked and beaten unconscious. He was then wrapped in Mahil's duvet and carried by Ravi and Peters and dumped into the boot of the Mercedes.

"The car was taken to a quiet area in Blackheath, south-east London.

"Petrol was poured into the car – including on him – as he lay either still unconscious from the beating, or completely helpless inside the boot.

"He was still alive at this point. The car was then set alight with him in the boot. That is how his life was ended."

Jafferjee said the jury would find that the defendants blamed each other for the death.