Actor Shia LaBeouf told an Austin police officer to "do whatever the (expletive) you gotta do" before the officer arrested him for public intoxication Friday in Austin's famous bar district, according to an arrest affidavit.

The officer stopped LaBeouf, 29, and two women around 7:30 p.m. Friday after they crossed into oncoming traffic at the intersection of East Sixth Street and San Jacinto Boulevard, the affidavit said.

LaBeouf — who recently starred in the films "Fury" and "Nymphomaniac" — raised his hand to the line of cars in the intersection, indicating that he wanted them to stop, according to police.

When the officer activated his overhead lights, LaBeouf "raised his hands waist high" before taking several steps away from the officer and the women as the officer exited his patrol car. The officer then order the actor to stop, according to the affidavit.

The "Transformers" star then "became increasingly confrontational, aggravated, profane and verbally aggressive with [the officer] through the stop, calling him a 'silly man' three times," according to the affidavit.

LaBeouf then reacted in a hostile way toward a man who had stopped to film the incident by "puffing his chest and walking in an aggressive and threatening manner" at him.

The officer stopped LaBeouf from "potentially assaulting the stranger," the affidavit says.

LaBeouf then began to "bow up or puff his chest" and stare intently at the officer within two feet of the officer's face, telling the officer that he was a member of the National Guard and telling the officer to "do whatever the (expletive) you gotta do!"