It’s the wild, wild west. West 47th Street.

A 23-year-old man got more than he bargained for — and sat in custody until Wednesday — when a horse-mounted cop cuffed him for allegedly robbing a woman inside the Rockefeller Center subway station on Monday, police said.

Officer Andrew Youssef was sitting on his horse, Brooklyn, and helping people with directions at about 8 p.m. when someone said there was a fight inside the station by the turnstiles.

A 23-year-old woman then came up, saying she had just been punched and robbed.

“I’m going to violate you,” the suspect allegedly said to her before breaking the strap of her bag and grabbing it. “I’m going to take that bag right off your back.”

She told police she screamed for help. And when she gave Youssef a description of her attacker, he realized he had seen the man run around the corner, cops said.

Brooklyn galloped off after him, and Youssef, who has more than 10 years with the department, caught up with 23-year-old Michael Reddish.

Youssef apprehended Reddish and returned him to a transit officer where he was arrested and charged, police said.

He was awaiting arraignment on Wednesday.

The woman was taken to Mount Sinai Roosevelt hospital where she was treated for swelling, police said.