Prosecutors agreed yesterday to drop murder conspiracy charges against the daughter of Malcolm X after two years if she completes psychiatric and drug and alcohol treatment, acknowledging that they would have had to rely on a questionable government informer if the case came to trial.

In a deal hammered out over the past few weeks and finalized over the weekend, Qubilah Bahiyah Shabazz, 34, accepted responsibility for her involvement in the plan to murder Nation of Islam leader Louis Farrakhan and agreed to drop her charges of an FBI frame-up.

Both sides described the settlement as an elegant way of defusing what had turned into an ugly and hugely controversial case, dredging up 30-year-old grievances and opening federal prosecutors to accusations that they were trying to split the leadership of the black community.

The agreement also averted a trial that was to start within hours in Minneapolis. U.S. Attorney David L. Lillehaug, the prosecutor in the case, said that although he was convinced he could have won in court, the circumstances of taking the case to trial would have been difficult.

"I knew there would be a lot of sympathy for her," he said. " . . . I knew that the informant had a very checkered past and would be very unsympathetic."

When they obtained an indictment against her last January, federal authorities said Shabazz believed Farrakhan was responsible for the assassination of her father 30 years ago in a Harlem ballroom. They said she had repeatedly discussed the idea of killing the Nation of Islam leader with an old school friend, Michael Fitzpatrick, who by chance happened to be an FBI informer.

But Fitzpatrick turned out to have a long and shadowy legal history. He admitted to taking $45,000 from the FBI for his role in the case. When transcripts of his secretly tape-recorded conversations with Shabazz were made public, her attorneys and other black leaders argued the tapes strongly suggested that Fitzpatrick had attempted to entice Shabazz into the plot to kill Farrakhan -- and not the other way around.

Lillehaug said that, ultimately, settlement was the most fair option. "We're of the view that her actions in this case arose from some unique historical and personal circumstances," he said. "It's an unusual case and we're convinced that she is not, or is no longer, dangerous. . . . I think we've done justice here. We hope and expect we will never again see her in court."

Shabazz, leaving the courthouse yesterday, said she was "relieved that it's over now and {I'm} leaving it behind me," according to the Associated Press.

"Both Qubilah and her mother feel that this settlement is a tremendous victory both for the defendant and the national black community," said Shabazz's lawyer, William M. Kunstler. "Ms. Shabazz affirms once more that she is guilty of no crime. She agreed with the {settlement} in order to be able to get on with her life, even though it was certain that no jury was going to believe the testimony of a man as evil and immoral as Michael Fitzpatrick. In my opinion, the case was designed to do what the government did more than 30 years ago, that is to split the black community into warring camps. Fortunately, it did not succeed."

The reason the Shabazz case was so controversial was that it touched on a question still hotly contested within the Muslim community: Who killed Malcolm X? The militant black leader was only 39 years old and at the height of his fame in February of 1965 when he was gunned down on the stage of Harlem's Audubon Ballroom. Three Muslims were convicted in the slaying.

But repeatedly over the years rumors have circulated alleging that Farrakhan, then a young Muslim leader in Boston with whom Malcolm X had had a falling out, was behind the slaying. A year ago on a New York television station, Malcolm X's widow, Betty Shabazz, said that "everybody talked about" Farrakhan's involvement in Malcolm's death and that it was considered a badge of "honor."

Then, in January, a documentary called "Brother Minister" was released showing previously unreleased footage of Farrakhan at a private Nation of Islam rally, addressing the outside white world and asking: "Was Malcolm your traitor or was he ours? And if we dealt with him like a nation deals with traitors, what the hell business is it of yours?"

Farrakhan has repeatedly denied any involvement in Malcolm X's death. But according to tape-recorded transcripts of Qubilah Shabazz's conversations with Fitzpatrick, she believed Farrakhan was behind the death of her father and that her mother's life also was in danger because she had spoken out against the Nation of Islam leader.

"He's just a slimy pig," Shabazz said of Farrakhan in one transcribed conversation. "And he cannot . . . sit back and let {Betty Shabazz} talk about him like a dog. So he's going to try to something to shut her up. . . . I do think that eventually he's going to in a very slick way have her killed. So it's either him or my mother." But the transcripts also show that when Shabazz's resolve to go ahead with the plan began to waver, Fitzpatrick attempted to urge her on. That, combined with Fitzpatrick's dubious history and Shabazz's own considerable personal troubles, meant that from the beginning the government was criticized for making a mountain out of a molehill.

"In my opinion she was entrapped, although her own personal anxiety and distress may have led her to be in a position where she could be entrapped," said Roscoe Brown, director of the Center for Urban Education Policy at the City University of New York and a close friend of the Shabazz family. "This is something that the Justice Department should not have wasted public money on. . . . If I was inclined to be paranoid, I would say that someone was trying to push the black community into disarray."

A Nation of Islam spokesman said Farrakhan "has said that Qubilah Shabazz is a victim of a nationwide conspiracy. . . . We believe that the United States government should reveal all those who took part in the wicked plan. As it was with Malcolm X, we don't know the full story."

Lillehaug said he had no choice but to at least bring the case, particularly after Shabazz gave a complete confession to the FBI in which she admitted to "suggesting the scheme" out of concern for her mother's life.

"I knew that the evidence was strong and if we swept this case under the rug and that came out, that would be totally unacceptable," Lillehaug said. "We would be faced with the charge that the government was covering up a plot to murder a prominent African American leader. . . . Whichever way we went on this case, there would be substantial criticism."

In the end, the government settled for an affidavit in which Shabazz reiterated that her confession was "substantially true," accepted "responsibility for my involvement in the plan," conceded that the FBI and U.S. Attorney's Office "acted in good faith," and agreed to undergo treatment.

Should Shabazz fail to fulfill the terms of the agreement, Lillehaug said, she will be "prosecuted vigorously not only for any new offense but also on the original murder-for-hire charges." CAPTION: Betty Shabazz, left, and daughter Qubilah Bahiyah Shabazz attend news conference announcing the settlement of the murder conspiracy case. CAPTION: Charges were dropped against Qubilah Shabazz, right. In exchange, she agreed to seek drug and psychiatric treatment.