A Missouri man admitted he killed a woman’s boyfriend after demanding his money back from a prostitute, police said Sunday.

The St. Louis County Prosecuting Attorney’s Office charged Eric Moore Jr., 26, of St. Louis, with second-degree murder, robbery and armed criminal action, according to a news release from St. Louis County police.

Moore arranged via text messages to pay $60 to a prostitute and met her at a St. Louis motel on Saturday, the probable cause statement said. He then allegedly gave the money to another woman in exchange for the sex act and at one point, Moore got upset over the lack of time that he was being given with the prostitute and demanded the money back, court documents showed.

MISSOURI MAN WEARING 'IT'S NOT A CRIME UNLESS YOU GET CAUGHT' T-SHIRT WANTED FOR ROBBING LAUNDROMAT

At the time, Moore and three women were in the motel room, according to the probable-cause statement, which added that he then pulled out a gun and demanded the money back from one of the women in the room.

The woman returned the cash, court documents said.

Because the women were screaming, one of the women’s boyfriends, Darren Woods, who was in an adjacent room, came into the room Moore was in and was then shot several times, including multiple times in the head, the probable-cause statement continued. Woods died at the scene.

HUMAN REMAINS FOUND ON MISSOURI FARM WHERE BROTHERS WERE LAST SEEN, POLICE SAY

Police said the women in the room identified Moore, who had left the motel after the shooting. Police later arrested him at a home he shared with his mother, according to court documents.

A gun was recovered from the home, investigators said, adding that ballistic examination showed the gun matched the shell casings found at the crime scene.

CLICK HERE TO GET THE FOX NEWS APP

When detectives interviewed Moore, he admitted he pulled out a gun to get the money back from the woman and admitted he fired the shots that killed Woods, the probable-cause statement said.

Moore was being held on $300,000 bond.