BOSTON — A retired Massachusetts judge Tuesday defended her decision to order a mentally ill woman to have an abortion and be sterilized against her wishes, and she blasted Boston University for rescinding a job offer after her ruling sparked controversy.

Christina Harms said she believed the schizophrenic woman would have chosen to have an abortion if she had been mentally competent. In her ruling, she granted a petition from the woman’s parents to have their daughter declared incompetent and awarded guardianship to them for the purpose of consenting to the abortion.

Ms. Harms‘ ruling drew spirited debate from bloggers on both sides of the abortion issue. Her written ruling remains sealed, under family court rules, but the gist of it became public after the state appeals court overturned the decision on Jan. 17.

Now the former judge has taken the unusual step of defending her decision publicly, both in media interviews and in a letter sent Monday to other family court judges in Massachusetts. The Boston Globe first reported on the judge’s letter.

Ms. Harms, who retired six days before the appeals court ruling, said a decision by Boston University’s School of Law to back out of a job offer shortly after the appeals court overturned her ruling sends the wrong message about judicial independence.

“Being a judge is not like being a contestant on ‘American Idol,’ ” she said Tuesday. “You are not looking for votes.”

The 31-year-old woman has not been named; she was identified in court papers only as “Mary Moe.” She had characterized herself as “very Catholic” and said she was opposed to having an abortion. Her parents had said their daughter was not a devout Catholic; they sought consent from the court for an abortion.

Ms. Harms said the woman had been taken off some of her anti-psychotic drugs because the medications could have harmed the fetus. After hearing from the woman and from her parents, the judge said she found that the woman had severe delusions, including her belief she was not pregnant, therefore the woman was not competent to decide whether to have an abortion. Ms. Harms said she also found that the woman, if she had been mentally competent, would have chosen an abortion to protect her own well-being.

In overturning Ms. Harms‘ decision, the appeals court used unusually strong language.

The court said no one had requested sterilization and that the judge “appears to have simply produced the requirement out of thin air.”

Ms. Harms said she had been negotiating with BU’s law school since August about a newly created position in which she would help the school in its efforts to increase the number of judicial clerkships and internships offered to its law students.

After first asking for her biography for a public announcement, BU officials said they never made a formal job offer to Ms. Harms. But they also acknowledged that the controversy created by her ruling contributed to the decision to take her out of the running for the job.

In a letter to Ms. Harms‘ lawyer, BU Deputy General Counsel Erika Geetter denied that it was concern about the judge’s ruling that persuaded the school not to move forward on the job.

Retired appeals court Judge Rudolph Kass called the decision by BU “unfortunate.”

“You don’t want judges sniffing at the winds to see what’s popular,” Mr. Kass said. “They should be trying to do what’s right in the circumstances.”