Shia LaBeouf (L), is arraigned in Midtown Community Court, on June 27, 2014 in New York City. The actor is charged with harrassment, disorderly conduct and criminal trespass following an incident during the show' 'Cabaret' Thursday night. (Source: Anthony DelMundo-Pool/Getty Images)

NEW YORK (AP) — Shia LaBeouf was released from police custody Friday after he was escorted from a Broadway theater for yelling obscenities and continued to act irrationally while being arrested, authorities said.

After his court appearance, the actor, wearing a ripped blue T-shirt, skinny jeans and boots, walked several blocks to The London NYC Hotel on West 54th Street. He declined to comment.

The 28-year-old, who starred in the first three “Transformers” movies, was arrested on charges of disorderly conduct, criminal trespass and harassment Thursday night at the Broadway show “Cabaret.”

According to police, security guards asked LaBeouf to leave the Studio 54 theater at about 8:45 p.m., but he refused, used obscene language and physically interfered with employees. Police said he made aggressive statements and threats to security guards and police officers.

He was acting irrationally, continued to make aggressive statements and used foul language after he was removed from the theater and throughout the arrest process, police said. Officers said he appeared intoxicated or under the influence of some kind of drug.

A spokesman for “Cabaret” says LaBeouf was “disruptive during Act 1” and was escorted out of the theater at intermission.

LeBeouf, who was represented by a Legal Aid attorney Friday, was due back in court July 24.

On Friday, as the pack of reporters trailed him to the hotel, a reporter fell out of her shoe. LaBeouf stopped to help her get back into it.

LaBeouf’s other films include “Indiana Jones and the Kingdom of the Crystal Skull,” ”Disturbia” and “Wall Street: Money Never Sleeps.”

Last year, LaBeouf pulled out of what would have been his Broadway debut in “Orphans,” a play starring Alec Baldwin. LaBeouf left the production over what was described as “creative differences” and was replaced by Ben Foster.

LaBeouf has been arrested previously.

In 2008, he was taken into custody on suspicion of drunken driving after another driver crashed into his vehicle in West Hollywood, California, but prosecutors later concluded there was insufficient evidence to file a formal charge.

In 2007, he was arrested for refusing to leave a downtown Chicago drugstore. Prosecutors dropped the case after store officials said they didn’t want to continue it.

In February, the actor participated in a performance-art oddity at a Los Angeles art gallery wearing a bag over his head with the words “I AM NOT FAMOUS ANYMORE” scrawled in black ink across it.

The stunt came days after he posed on the red carpet at the Berlin Film Festival in the same getup. At the same festival, he walked out of a news conference after answering a reporter’s question by saying: “When the seagulls follow the trawler, it is because they think sardines will be thrown into the sea. Thank you very much.” The line was borrowed from a French soccer player who baffled reporters with it in the mid-1990s.

Last year, LaBeouf came under fire for borrowing the storyline and dialogue for his short film “Howard Cantour.com,” which closely resembled the 2007 graphic novel “The Death-Ray” by Daniel Clowes. LaBeouf apologized on Twitter in a series of posts that were directly lifted from other famous mea culpas.