Brooklyn District Attorney Charles Hynes has fired the head of his Gang Bureau for using homophobic language and calling a top prosecutor “the head n—-r,” The Post has learned.

Deanna Rodriguez had been suspended since March for using terms including “faggot” and “dyke” to insult interns, paralegals and assistant DAs, as The Post had exclusively reported.

But further investigation found the fiery Rodriguez had also used a racial slur.

“When this issue first arose, Deanna Rodriguez was immediately suspended for 90 days without pay,” Brooklyn DA spokesman Jerry Schmetterer said yesterday.

“Today, after complete review of her conduct, she was terminated effective immediately,” he added.

Rodriguez, who earned about $160,000 a year, had run the office’s gang unit since 1996.

The Post reported in March that she had been suspended after allegedly sending an e-mail to a female paralegal that contained physical threats and the homophobic slurs.

Assistant DAs in the Gang Bureau spoke highly of Rodriguez’s leadership, but several Brooklyn prosecutors said she had a reputation for tirades.

“She’s a wild woman. She’s nuts,” one law-enforcement source said when she was suspended.

Employees of the DA’s Office filed several complaints against Rodriguez, including one with the federal Equal Employment Opportunity, sources said.

“A lot of people have had incidents with her,” the law-enforcement source said.

In the course of the internal probe, it was discovered that she had referred to one of Hynes’ top prosecutors, an African-American man, as “the head n—-r” in a conversation with another employee in the office, a source with knowledge of the investigation told The Post.

She was talking about Lance Ogiste, counsel to the district attorney, the source said.

The district attorney’s Web site lists him third among Hynes’ senior staff.

The firing comes as Hynes’ office is the subject of a reality-TV show, CBS’s “Brooklyn DA,” and while he faces African-American and Indian challengers in a tough re-election campaign.

Asked by a reporter yesterday about her firing, Rodriguez — wearing a white sweat shirt printed with the words “Law Diva” — said, “You’re writing the wrong story.”

“This is about vilifying me,” Rodriguez said. “It’s not the right story. I’m not prepared to talk.”

“The majority of what was written the last time was not accurate.”

Rodriguez refused to comment on whether she felt wrongfully terminated and whether she would dispute the firing.

The acting head of the Gang Bureau is now Executive Assistant District Attorney Edward Carroll.