Shia LaBeouf was charged with misdemeanor criminal trespassing after the "Transformers" star refused to leave a Chicago drug store, police said Sunday.

A security guard told LaBeouf that he needed to leave the Walgreens store because he appeared to be drunk, police said.

When LaBeouf, 21, refused to leave, the security guard detained him and called police at about 2:30 a.m., according to police spokeswoman Laura Kubiak.

After he was arrested, police noted that LaBeouf was "very courteous and polite," Kubiak said. Police said he posted bond before 7 a.m., but Kubiak did not know the amount.

LaBeouf, of Glendale, Calif., is scheduled to appear in Cook County court on Nov. 28.

Police did not administer a sobriety test because LaBeouf was not driving a vehicle, Kubiak said.

Publicists for LaBeouf did not immediately return calls for comment.

The actor is set to co-star with Harrison Ford in "Indiana Jones and the Kingdom of the Crystal Skull," due in theaters next year.