A man killed a teenager three days after being released from prison, then hid her body in a clingfilm-wrapped wardrobe, a court heard.
Ashley Foster, 24, denies murdering Megan Bills in his room at a hostel in Brierley Hill on Easter Sunday 2017.
He has admitted preventing the decent and lawful burial of the 17-year-old.
Mr Foster had claimed she passed out after asking to be strangled during sex, the court heard.
But prosecutor Crispin Aylett QC alleged she died in a sex attack.
Mr Foster left his room and locked the door behind him on Easter Sunday, about two hours after Megan was seen on CCTV entering the room, the court heard.
Mr Aylett told Wolverhampton Crown Court: “None of the CCTV was ever to pick up Megan leaving the room and there is no other reliable evidence of her ever being seen alive again.”
Detailing how Ms Bills’ body was found, Mr Aylett said hostel staff carried out a routine inspection.
“When somebody commented that the room smelled, Foster said the smell came from the carpets”, he said.
By the following day the smell had worsened and staff cut through the clingfilm, found Ms Bills’ body and contacted police, the court heard.
Jurors were told a pathologist said it was not possible to say how she died, but it was “beyond doubt” Mr Foster had wrapped the cupboard because his fingerprints were found on the clingfilm.
The trial continues.