A judge has ordered an Iraq war veteran to stay away from Tom Cruise, after the man brandished a gun near a freeway and weeks later tried to hand-deliver a letter to the actor, attorneys said on Thursday.

Edward Van Tassel, 29, wanted to get the letter in Cruise's hands to enlist him in the cause of helping other veterans, said the former soldier's attorney, Robert Landheer.

Van Tassel went to Cruise's Beverly Hills mansion on December 3 and again on Sunday in an attempt to deliver the letter, Landheer said.

On Wednesday, Santa Barbara Superior Court Judge George Eskin issued a restraining order to prevent Van Tassel from approaching Cruise or his residential property.

"He's coming home like hundreds of other veterans, wounded and suffering from whatever kind of scarring that is," Landheer said.

Bert Fields, an attorney for Cruise, said the actor did not ask for the restraining order.

"Tom didn't even know about it, and the judge did the right thing -- you've got to respect the judge for it. But it was not something Tom applied for," Fields said.

Authorities arrested Van Tassel last month on weapons charges after an incident near Santa Barbara, northwest of Los Angeles, in which he stood on a freeway overpass with a gun and a sign in what his attorney described as a protest.

Following the arrest, he was sent to a veterans' hospital in Los Angeles, but left the facility when he tried to deliver the letter to Cruise.

Van Tassel has been sent back to the hospital where he is receiving psychiatric care and is no longer permitted to leave, Landheer said.

Fields said Cruise "feels very strongly about veterans of not only the Iraq war, but any veterans of war, and that they should be taken care of."