Six months before the killing, Grice reported to police that she was being stalked by Lane.
Jurors also heard that Cooke's car was damaged, with a note left on it reading: "Dear Ash, Shana has and always will cheat on you. Happy New Year."
Lane, who got to know Grice when they both worked at Brighton Fire Alarms, was warned by police to stay away from her, jurors were told.
Five months later, on July 9 last year, Lane was cautioned by police for another incident after he stole a key to her back door before letting himself in as she hid under her duvet, the court heard.
Opening the Crown's case, prosecutor Philip Bennetts QC said he had become "obsessed".
"During their relationship, he stalked her. He put a tracker on her car and followed her movements," he said.
"That obsession with her translated into killing her. He would not allow anyone else to be with her."
Two days before Grice was killed, she met Lane at a hotel in Hove where it was agreed their relationship was over, but he refused to accept it, the jury heard.
On August 25 last year, Bennetts said Lane waited until the last person, believed to be Cooke, had left Grice's bungalow before he went in to the property and her throat.
He then dismantled the fire alarms and set fire to her bedroom using an "ignitable liquid", the court heard.
Her body was found face-down on the bed in the smoke-filled room by Cooke's father, Ian Cooke, after her concerned colleagues reported she had failed to arrive at work.
Cooke told the court a piece of cardboard had been wedged in the bedroom door to keep it closed.
After retreating outside to get some air, Cooke said he and his sister-in-law Debbie Kennard went back into the smoky bedroom.
Cooke said: "I saw the bed and at first I thought it was just a duvet, then I realised there was a body on the bed.
"I was shouting out for Shana. I then saw her face down, arms to her side. Me and Debbie looked at each other in shock and horror."
A post mortem examination of her body gave the cause of death as an incised wound to the neck measuring 10.5cm.
Lane was arrested on the day of the killing at his workplace, Michael Lane SE Tyres.
Bennetts said: "He responded by saying 'Murder' but made no further comment. He did not ask who he was being accused of murdering or when indeed it had taken place."
Police later found a pair of bloodstained white Lonsdale trainers by a hedgerow five days after Grice's death.
DNA showed that Lane had worn those shoes at some point, and a scientist's opinion was that a footprint found on Grice's doorstep came from a Lonsdale shoe.
In earlier police interviews, Lane said he had not been at Grice's home on the day of the killing but later changed his account. He told officers: "You ain't going to believe me ... in the morning I did go to Shana's."
Bennetts said Lane told police he called at her home after driving past and spotting her car parked outside.
Bennetts told jurors: "The front door was open so he went in and saw Shana. Shana was on the floor leaning against the bed. There was no burning or fire. He left. He didn't telephone the police. He didn't telephone for an ambulance.
"He told no-one about what he had seen. He panicked. He said he thought the police would blame him."
Lane also said in a later police interview that he had installed a tracker on Grice's car after initially saying he had bought it to cut his insurance premiums.
Of Lane, Bennetts went on: "There is, we submit, no other candidate. His last account of entering the house and seeing Shana Grice does not survive examination."
Lane denies murder. The trial continues.