PORT ST. JOE, FLA. -- Security guard Clyde Melvin opened fire yesterday during an alimony hearing at the Gulf County Courthouse, killing the judge, his ex-wife's lawyer and one of her relatives before being wounded by the sheriff, authorities said.

Melvin, a guard at St. Joe Paper Co., was hospitalized and later charged with three counts of first-degree murder and one count of aggravated battery, State Attorney James Appleman said.

Melvin and his ex-wife, Inez, were divorced last year. Inez Melvin's lawyer, Thomas B. Ingles, had asked Judge W.L. Bailey, a 14-year veteran of the bench, to hold Clyde Melvin in contempt for refusing to pay $175 a week alimony.

Ingles, who apparently tried to disarm the gunman, was the first person shot, Appleman said, and Bailey was killed as he tried to flee into his office.

Peggy White Paulk, a relative of Inez Melvin, also fled and was shot and killed on the stairway between the first and second floor of the courthouse, Appleman said. Melvin's attorney, Robert Moore, escaped injury because he headed out of the room when he saw Melvin pull the gun.

Melvin then grabbed his ex-wife and fled across a catwalk that connects the courthouse to the roof of the county jail, where she was shot. As Melvin turned to fire on sheriff's deputies on the ground, Sheriff Al Harrison shot him, Appleman said.