SPRINGFIELD, Ill. (AP) — A federal judge Monday declared a close friend of President Barack Obama to be a “hostile witness” in a trial over funds allegedly misused at the Illinois Department of Public Health, following a hearing where Dr. Eric Whitaker leveled accusations of racial bias against prosecutors.

U.S. District Judge Richard Mills’ decision came after Whitaker testified at length outside the presence of a jury in the trial of Chicago businessman Leon Dingle Jr.

READ MORE: Pair Charged In Murder Of 8-Year-Old Melissa Ortega Denied Bail; Accused Teen Gunman Committed Three Previous Carjackings, Prosecutors Say

Declaring Whitaker a “hostile witness” means prosecutors now have more leeway in questioning him in the fraud case, where Dingle is accused of diverting $3 million in Department of Public Health grant money to his personal use.

While Whitaker, a Chicago physician, has not been charged with a crime, the U.S. attorney’s office said he has reneged on an agreement to cooperate, refusing to answer only “irrelevant” questions about whether he had a sexual relationship with his former chief of staff, Quinshaunta “Quin” Golden, who pleaded guilty in the case last spring and awaits sentencing.

The judge ruled last week that evidence suggested Whitaker could be a witness hostile to the government, but said he wanted to hear him answer questions outside of the presence of a jury before ruling.

Whitaker spent more than two hours on the witness stand Monday afternoon, answering questions about his work with Dingle and Golden, as well as his extracurricular activities. He was not specifically asked about the nature of his relationship with Golden on Monday, but noted that it would be “fair to say” that it was “more than professional.”

Asked whether he considered himself a hostile witness, Whitaker described himself as “angry but not hostile.”

“Personally,” he said, “I’m upset about the process and being made to look like I’m on trial.”

He also expressed concerns that the grant fraud cases pursued by attorneys in the Central District Court could be racially motivated.

READ MORE: Chicago First Alert Weather: Lake Effect Snow To Impact Your Commute

“Almost everybody has been African-American,” Whitaker said of those who have been indicted or scrutinized. “It raises questions for me.”

Whitaker was the agency’s director from 2003 to 2007.

The government has charged Dingle and his wife, Karin, with fraud, money laundering and tax evasion for allegedly using more than $3 million in grant funds intended for AIDS awareness and other public health programs on luxury cars, a yacht club and vacations.

In addition to his ties to Golden, the government says Whitaker was an “approving official” of DPH grants during the time millions of dollars went to Dingle groups.

Dingle’s lawyers argue that Whitaker’s interactions with Dingle were rare, short-lived, produced insignificant benefits and are seven-year-old history.

“I know we had grants,” Dingle said Monday. “I don’t know that we managed grants day to day.”

U.S. Attorney Timothy Bass said prosecutors will inform the judge on Tuesday whether or not they intend to call Whitaker to testify. The trial, now in its seventh week, has one more witness to call aside from Whitaker.

MORE NEWS: Bears Reportedly Hiring Colts Defensive Coordinator Matt Eberflus As New Head Coach

(TM and © Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)