Bayley, of Coburg, entered a plea of guilty plea to one count of rape relating to an incident in September last year, and not guilty to one count of murder and two further rapes charges.
Prosecutor Gavin Silbert SC told the court Bayley approached Meagher on Sydney Road in Brunswick moments after she left a bar, dragged her into an alley and raped her.
Silbert alleged Bayley then went home to get his car and a shovel before returning at 4.22am and then left the body by a dirt road.
The court heard in a 10-hour police interview Bayley admitted to raping and strangling Meagher and took detectives to the body.
Meagher’s body was found clothed and on her side, pathologist Matthew Lynch said, adding her injuries indicated she’d been strangled.
Dr Lynch added Meagher was intoxicated.
During the hearing, Bayley sat in the dock behind a security screen while Meagher’s parents George and Edith McKeon and her brother Michael were present.
Meagher’s husband Tom heared Bayley admit to the rape of his wife but emotionally left the room soon after.
Bayley is due to stand trial in the Supreme Court on March 25.