Shia LaBeouf reportedly chased a homeless man around New York City before his arrest.

The 'Nymphomaniac' star, who was charged with harassment, disorderly conduct and criminal trespassing for allegedly using offensive language and smoking while watching a performance of 'Cabaret' on Broadway on Thursday night (26.06.14), was spotted arguing with homeless man over a baseball cap on the streets of the city a few hours beforehand.

A source, who shared photographs of the dispute with gossip website TMZ.com, said that the actor - who was wearing a bright blue T-shirt with a huge hole on the shoulder - was acting as if he knew the man, but seemed ''whacked out'' and was making no sense.

The eyewitness added that the 28-year-old actor repeatedly shouted, ''It's me, Shia,'' at the man.

Police were called to Studio 54 theatre on Thursday night after he refused to listen to security guards when they asked him to leave, before allegedly proceeding to swear at them and physically interfere with them.

New York Police Department spokesperson George Tsourovakas previously said: ''He was being rather difficult and combative, verbally ... To the point where security guards asked him to please leave the premises and he refused. Police were called and he was detained and arrested.''

The 'Transformers' star, who allegedly hurled homophobic slurs and spat at his arresting officers, had his first hearing in court this morning (27.06.14) and was released afterwards, but is due back in front of a judge on July 24.

Shia has sparked fears for his mental health in recent months and stormed out of a press conference in Berlin in February before attending his film premiere wearing a paper bag on his head that read, ''I am not famous any more.''

He was also forced to apologise for alleged plagiarism late last year and starred in his own silent art installation in Los Angeles.