A man called 'a danger to society’ based on convictions dating back more than four decades is accused of sexually assaulting a sleeping homeless woman outside a downtown Grand Rapids building.

Robert Lee Bateman, 63, is charged with criminal sexual conduct with injury and unarmed robbery for an Oct. 8 assault on South Division Avenue south of Fulton Street. He was arrested three days later.

“This was a violent sex attack on a sleeping victim and he was just released from prison,’’ investigators wrote in court records. “Robert Bateman is a danger to society with regards to his sexually assaultive behavior.’’

Bateman has spent much of his life in and out of prison for offenses ranging from second-degree murder to home invasion. He was released from prison in May after serving a maximum term for interfering with an electronic communications device in Muskegon County. He was staying at Mel Trotter Ministries on Commerce Avenue SW when the October assault occurred, court records show.

The 44-year-old victim reported she awoke to find Bateman sexually assaulting her, Grand Rapids Police Sgt. Terry Dixon said. “She fights him off and he takes her backpack and goes through it as he is walking away.’’

Bateman has been ordered to stand trial in Kent County Circuit Court on three counts of criminal sexual conduct and being a habitual felony offender. He’s on Michigan’s Sex Offender Registry for several convictions dating back to 1983. Bateman served 2½ to 10 years on a 1971 conviction for indecent liberties with a child.

He also served time for a 1981 murder in Wayne County, breaking and entering, felonious assault, retail fraud and failing to register as a sex offender, state records show.

“His criminal history consists of one violent felony conviction after another since 1971,’’ a pretrial investigator wrote. “He is clearly a danger to the community.’’

A judge agreed. Bateman was ordered held without bond in the Kent County Jail pending his next court appearance in December.