Rep. Duncan Hunter’s alleged extramarital affairs may be considered as evidence in his upcoming corruption trial, a judge said Monday.

Prosecutors said the California Republican wrongly used campaign cash for vacations, golf outings and other personal expenses. U.S. District Judge Thomas Whelan said the allegations of extramarital affairs were relevant to whether campaign money was spent illegally and spoke to motive and intent.

Prosecutors revealed salacious details about the married congressman’s lifestyle in court filings last week, saying he used some of the campaign money to finance a string of romantic relationships with lobbyists and congressional aides.

Jurors can hear evidence of Rep. Duncan Hunter’s alleged extramarital affairs, a judge said Monday. (AP Photo/Gregory Bull, File)

Jurors can hear evidence of Rep. Duncan Hunter’s alleged extramarital affairs, a judge said Monday. (AP Photo/Gregory Bull, File)

Hunter’s attorney, Gregory Vega, argued that any mention of extramarital affairs and “personal indiscretions” would be “extremely prejudicial” at the trial, scheduled to start in September.

“I’m afraid that it will be the focus, instead of the evidence,” Vega said.

The judge acknowledged that the allegations were sensitive and said prosecutors and Hunter’s team could decide how to describe the relationships.

Whelan, ruling on a flurry of procedural motions, didn’t address Hunter’s bid to dismiss charges or move the trial out of San Diego. He said Hunter could keep speaking publicly about the case.

Hunter, an Iraq War veteran and an early supporter of President Trump, sat quietly next to his attorney during the hearing.

The Hunter name represents something of a political dynasty in the area — his father captured the seat in 1980 and held it until his son was elected in 2008.

His father, former Rep. Duncan Hunter Sr., told reporters the charges were politically motivated. Attorneys for the congressman have argued that prosecutors tied to the case were at a Hillary Clinton fundraiser in August 2015, and tried to get a photo with the Democrat, compromising their impartiality.

HUNTER BLAMES 'DEMOCRAT PROSECUTORS' FOR HIS INDICTMENT ON CORRUPTION CHARGES

The elder Hunter, who sat in the front row of the courtroom, gave reporters copies of an email from the U.S. Secret Service on how to get a photo taken with Clinton at the fundraiser. The email, part of a June 24 court filing, redacted the recipients’ names but was a response to a Freedom of Information Act request for communications with two prosecutors involved in the case.

“This is the smoking gun,” Hunter Sr. told reporters.

The government said the prosecutors attended the fundraiser in an official capacity to assist law enforcement.

Hunter and his wife were indicted last August on charges that they used more than $250,000 in campaign funds for personal expenses ranging from groceries to golf trips and family vacations, then lied about it in federal filings.

Margaret Hunter, who was not in court Monday, pleaded guilty last month to one corruption count and agreed to testify against her husband.

Hunter has said his campaign made mistakes, that he gave his wife power of attorney when he deployed as a Marine to Iraq in 2003 and that she handled his finances during his last five terms in office.

CLICK HERE TO GET THE FOX NEWS APP

Hunter, 42, was re-elected in his strongly Republican congressional district in San Diego County last year despite the indictment.

The Associated Press contributed to this report.