In early May, the mayor hit Family Court Judge Cira Martinez with the biggest surprise decision of her court career: she was getting canned. Up for a 10-year term renewal, Martinez, who was the chief administrative judge in the Bronx, was informed at her Gracie Mansion swearing-in ceremony that she was being reappointed for only five months. “She was just stunned,” said a source close to Judge Martinez. “There had been absolutely no intimation from any point up to that moment.”

Martinez promptly resigned from her administrative post and moved to the Manhattan bench for her truncated term. Last week, New York State Chief Judge Judith Kaye met with Mayor Rudolph Giuliani to express concern about his refusal to reappoint Martinez, who had been already approved by the mayor’s own review committee and the city Bar Association.

It’s no surprise that the administration is at odds with Martinez, a famously outspoken Dinkins appointee well known for refusing to let city attorneys abuse their power in her courtroom. The shock is that the mayor appears to have used that reputation as his sole reason for removing Judge Martinez from the bench.

“People are very sad, very angry. It seems very politically motivated,” said Jonathan Roman, the union steward for the Bronx office of Legal Aid’s Juvenile Rights Division. “It was so obviously done with the intent to humiliate and embarrass her, when she’s one of the best judges we have.” Legal Aid attorneys represent juvenile delinquency defendants as well as children in neglect and abuse cases.

According to Bronx courthouse sources, two incidents came up that appear to have sealed her fate. In one, attorneys for the city claimed that Martinez yelled at a child witness who was reluctant to testify in a juvenile assault case. Legal Aid and court staff contend that the judge was, in fact, directing her fury at the city prosecutors who were pressuring the child to speak.

The second incident, extensively discussed in Martinez’ review, was more complex. Dismissing an Administration for Children’s Services charge that a woman had neglected her children, Martinez told the doctor who reported the case that he should be working in “a very happy, orderly environment, not in the Bronx, because he certainly lacks any knowledge of the culture and the traditions.”

The doctor had testified that the woman he reported had been hostile toward her hyperactive daughter in a hospital waiting area, calling her a “bitch” and “bad child” who “had the devil in her.” After refusing to consent to tests for the girl, said the doctor, the woman threatened the doctor and hospital staff and was sent for a psychiatric evaluation. Martinez rejected the testimony and dismissed the case, saying that the woman only became disorderly when she learned that ACS might take her children away. The city and the child’s Legal Aid attorney appealed, and Martinez’s decision was overturned.

The court administration is standing behind Martinez. “We fully supported her, and that support was demonstrated by making her a supervising judge,” said New York City chief Family Court judge Michael Gage. “Nothing in the intervening three years has changed that.”

Meanwhile, court watchers are perturbed that judicial appointments may be reverting to what they once were: a patronage plum doled out by the mayor. “This raises concerns that the problem might be disagreement with judicial decisionmaking,” said Barbara Reed, interim director of the Fund for Modern Courts. “That’s something that could be a threat to judicial independence.”