Police initially planned to charge Lafrem with assault, but prosecutors upgraded the case because of the victim's injuries.
The 29-year-old victim suffered a broken nose, broken jaw and fractures to her eye socket and skull.
After hearing of Lafrem's arrest, people outside the Midtown Bar were relieved.
"That's terrific I hope it's the right person," said one person outside the bar.
Police believe they got their man.
MBarek Lafrem is accused of brutally beating the woman in the ladies room at the 8th Avenue bar.
"I'm glad to hear that. Surveillance cameras do help," said another bystander.
In this case the surveillance cameras outside the bar and at a nearby deli proved invaluable.
One law enforcement source says someone recognized the suspect in the video and that's what led to his arrest.
He was seen leaving the bar, shaking his right hand as if in pain, after allegedly knocking the woman out in the ladies room of the bar.
Police say he tried to rape the woman as well.
Later, she was found unconscious and was rushed to New York Hospital.
Her family released a statement expressing their "gratitude for the outpouring of support they have received."
After taking him into custody, police questioned the man for several hours and then formally arrested and charged him late Friday evening.
Lafrem is from Norwood, Pennsylvania. He also faces an attempted rape charge.
He was silent at his court hearing. His lawyer declined to comment.