Former executive chef Todd Schneider trails his attorney Steve Benjamin, right, as they leave the John Marshall Courthouse on Monday. (Dean Hoffmeyer/AP)

RICHMOND — A Richmond judge decided Friday to let the embezzlement case against the former Virginia governor’s mansion chef move forward, ruling that Attorney General Ken Cuccinelli II’s conflicts of interest had not tainted the case.

The ruling by Richmond Circuit Court Judge Margaret P. Spencer clears the way for the politically charged case to go to trial three weeks before Election Day, when Cuccinelli (R) faces Democrat Terry McAuliffe in the race for governor.

Chef Todd Schneider faces four felony counts of embezzling more than $200.

Attorneys for chef Todd Schneider had argued in a court hearing Monday that the charges should be dismissed because Cuccinelli had failed to disclose ties to a Republican political donor connected to the case.

“This Court has . . . found no authority in Virginia supporting Defendant’s position that dismissing the indictment is an appropriate remedy in this case,” Spencer wrote in the ruling issued Friday afternoon.

When he was charged with taking food from the mansion, Schneider told authorities he had evidence of wrongdoing by Gov. Robert F. McDonnell (R) and his family, including a check showing that Star Scientific Inc. chief executive Jonnie R. Williams Sr. had picked up the $15,000 catering tab at the wedding of the governor’s daughter Cailin. Schneider had catered the wedding through a private firm he had on the side.

Schneider’s attorneys, Steve Benjamin and Betty Layne Des­Portes, contended that Cuccinelli’s office turned a blind eye to the chef’s allegations because the attorney general had his own, undisclosed ties to Williams.

Cuccinelli has received more than $18,000 in personal gifts from Williams and until recently owned stock in Star Scientific, a supplement maker. The attorney general failed to disclose his stock holdings and some of those gifts, reporting lapses he attributed to oversights.

Cuccinelli’s campaign said that his office staff purposely “walled off” Cuccinelli from Schneider’s allegations about the governor because of his connections to Williams.

In November, Cuccinelli asked Richmond Commonwealth’s Attorney Michael Herring to review McDonnell’s annual financial disclosures. Federal authorities are also investigating McDonnell’s connection to Williams.

In May, the attorney general’s office sought and received Spencer’s permission to be recused from the case for reasons unrelated to Cuccinelli’s connections to Williams, including the fact that a key prosecution witness had once worked for Cuccinelli’s political fund-raising firm. It also noted that the chef’s attempt to raise questions about the governor’s conduct caused problems because attorney general’s office represents the governor on many other matters.

Spencer appointed Norfolk prosecutor Greg Underwood (D) to pick up the case.

The chef’s lawyers argued that recusal was not a sufficient remedy for the conflicts, contending that Cuccinelli’s ties to Williams so tainted the case that the indictment should be dismissed.

Schneider’s lawyers have said that McDonnell family members authorized him to take food from the mansion as payment for personal and political events that fell outside the scope of his job as mansion chef.

McDonnell and first lady Maureen McDonnell have promoted Star Scientific’s nutritional supplement, Anatabloc. Maureen McDonnell has traveled to at least one out-of-state investors’ conference to pitch the product and the governor and first lady held a product-launch party in the mansion.

McDonnell has said their efforts were in line with what they would do to promote any home-state business. He also has said that he did not disclose the wedding payment because it was a present to his daughter, not him.

Virginia law allows elected officials to accept gifts of any size so long as they disclose any worth more than $50. Gifts to family members do not need to be reported.

In addition to the $15,000 in catering, Williams has provided the McDonnells with a $6,500 Rolex watch and a $15,000 designer shopping spree in New York, The Post has reported. Williams also has provided them with monetary gifts or loans, including $70,000 to a real estate corporation owned by McDonnell and his sister, $50,000 to the first lady, and $10,000 to another daughter before her wedding this year.