A court commissioner has signed off on an unusual restraining order against celebutante Paris Hilton, ordering her to stay at least 100 yards away from an event producer who claimed she threatened him — unless they're at a party together.

Brian Quintana was granted the three-year restraining order against Hilton last month after he testified that the celebutante harassed and threatened him after their friendship soured.

Because Quintana, 37, and Hilton, 25, occasionally attend the same social events, their attorneys drafted an untraditional restraining order that was approved by Superior Court Commissioner Tim Murphy on Monday.

The agreement stipulates that when they attend the same parties, "the stay-away distance may be shortened to 25 feet," according to court papers.

Hilton spokesman Elliot Mintz has said his client wants nothing to do with Quintana and is happy to keep her distance from him.

Quintana testified that he met Hilton on the party circuit a few years ago and later introduced her to future boyfriend Stavros Niarchos III.

Quintana said their relationship soured after he urged Niarchos to reconsider dating Hilton.