U.S. District Judge Richard Cebull says he will apologize to President Obama and ask for a panel of judges to investigate his conduct after a Montana newspaper reported he had sent a racially inflammatory message using his courthouse email account last month.

The Great Falls Tribune reported the judge had forwarded the following message to six of his friends February 20:

"Normally I don't send or forward a lot of these, but even by my standards, it was a bit touching. I want all of my friends to feel what I felt when I read this. Hope it touches your heart like it did mine. A little boy said to his mother: 'Mommy, how come I'm black and you're white?'"His mother replied, 'Don't even go there Barack! From what I can remember about that party, you're lucky you don't bark!"

Cebull, who serves as the top federal judge in the state of Montana, told lawmaker Denny Rehberg (R-Montana) in a phone call Thursday that he would send a formal apology to Obama

The congressman's spokesman, Jed Link, said "Denny took his apology to be heartfelt and sincere."

Cebull also told the congressman that he would ask a special ethics panel made up of federal district and appeals court judges to look into the incident.

Legal ethics expert Stephen Gillers told NPR in an email that Cebull may have run afoul of the code of conduct for federal judges by allegedly giving the appearance of impropriety. Gillers, who teaches at the New York University Law School, said the judge did not make his comments during a case, or in the performance of his official duties, but he still may have triggered Canon #2 of the judicial code, which says a judge needs to avoid impropriety and the appearance of impropriety "in all activities."

"A judge should respect and comply with the law and should act at all times in a manner that promotes public confidence in the integrity and impartiality of the judiciary," the document says.

The judge told the newspaper that he was not racist, but "I am not a fan of our president....I sent it out because it's anti-Obama." Cebull was appointed to the federal bench by President George W. Bush in 2001. Earlier, he had worked as a magistrate judge and a medical malpractice lawyer in Montana.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.