WEST PALM BEACH, Fla. (AP) _ A man's fear of leaving the house from which he allegedly ran a prostitution ring has left him mentally unfit for trial, a judge ruled.

Three court-appointed mental health experts testified that John H. Kelly, 56, suffers from acute agoraphobia, a fear of open spaces, and cannot come to court.

Kelly won't be involuntarily committed to a state mental hospital, the fate of most incompetent defendants, because he isn't a danger to himself or society, Circuit Judge Hubert Lindsey ruled Wednesday. The judge said that Kelly instead will remain ''essentially a prisoner in his home.''

''I've been trying for 30 years to become competent,'' Kelly said from home. ''I want to go out that door more than ever, so help me God.''

Five others have been charged in the case, including Kelly's wife, Maxine. Defense attorney Greg Lerman said the charges should be dropped.

''The target was John Kelly,'' he said. ''If the target is gone, what's the point of spending any more money?''

Assistant State Attorney Aleathea McRoberts said the case against the others would proceed. ''The evidence remains the same,'' she said.

Kelly was arrested in December 1989 for allegedly operating an escort service that was really a prostitution ring.