NEW YORK — A state court has issued a temporary restraining order preventing the C.W. Post campus of Long Island University from taking further action against five resident assistants who made a fake hostage video that the university claimed was offensive.

The judge’s ruling, issued Feb. 9, ordered that the university reinstate the students to their jobs and prevented the school from taking further punitive action until a Feb. 28 hearing.

The order was issued after the students’ lawyer, Frederick Brewington, filed a $2.5 million wrongful termination suit against the private university.

Brewington is alleging that university officials defamed the students in a meeting by calling them racist and psychologically troubled. He said he has evidence in the form of witness accounts.

A spokeswoman for the university declined to comment.

During the two-minute video, “A Duck Napping,” four of the students appear in ski masks holding the dorm’s mascot, a rubber duck, as a hostage, according to a Newsday article. They make ransom demands in broken English while Middle Eastern-sounding music is played in the background, and the words “Muhammad” and “jihad” are heard.

The video appeared on online video Web sites, and the five were dismissed from their posts.

Robert Bennet, one of the students, told Newsday that the lines in the video were taken from the 2004 film “Team America: World Police.”