A student who was shocked by a campus police officer's Taser gun after he refused to show ID at a UCLA library thought he was being singled out by the officer because of his Middle Eastern appearance, his lawyer said.

Attorney Stephen Yagman said he plans to file a federal civil rights lawsuit on behalf of the U.S.-born student, Mostafa Tabatabainejad.

Tabatabainejad, 23, was shocked Tuesday night after arguing with a campus police officer who was conducting a routine check of student IDs at the University of California, Los Angeles Powell Library computer lab.

Yagman said his client declined to show his school ID because he thought he was being targeted for his appearance. His family is of Iranian descent.

Police have said Tabatabainejad encouraged others at the library to join his resistance, and when a crowd gathered, the officer used the stun gun on him.

Yagman disputed that, saying Tabatabainejad started yelling to draw attention after the police officer pulled out the Taser.

Tabatabainejad was arrested for resisting and obstructing a police officer and later released on his own recognizance.

The incident, recorded on another student's camera phone, showed Tabatabainejad screaming while on the floor of the computer lab. It was the third time in a month in which police behavior in the city was criticized after amateur video surfaced.

UCLA's interim chancellor, Norman Abrams, urged the public to withhold judgment while the campus police department investigates.

Several civil rights organizations, including Amnesty International and the Council on American-Islamic Relations, have called for an independent review.