A judge ruled Wednesday that Eric Trump must testify in response to a subpoena from the New York attorney general’s office as part of an investigation into whether the Trump organization improperly valued real estate assets in statements.

Eric Trump, the president’s middle son and a top executive at the organization, has until Oct. 7 — less than a month before the general election — to testify, Judge Arthur Engoron ruled after a hearing in Manhattan Supreme Court. Trump’s lawyers had requested to delay his deposition until after the election so he could campaign for his father.

New York Attorney General Letitia James requested the judge enforce her subpoena after Eric Trump abruptly canceled an interview with James’ office and a week after The Trump Organization said that neither the company nor its lawyers would comply with seven subpoenas tied to the investigation.

The Trump Organization, an umbrella group for the president’s financial holdings, hit back at James’ request, questioning the timing and argued that the probe is politically motivated.

NEW YORK AG ASKS COURT TO ENFORCE SUBPOENAS ON TRUMP ORGANIZATION IN FRAUD INVESTIGATION 

James opened the investigation after President Trump’s former attorney Michael Cohen testified that his former client’s financial statements inflated the value of Trump’s assets to obtain loans and insurance coverage and deflated the value of other assets for tax purposes. James specifically requested access for financial records related to the Seven Springs Estate in Westchester County, New York.

RNC SPEAKERS: WHAT TO KNOW ABOUT ERIC TRUMP 

“Justice and the rule of law prevailed today,” James said in a statement. “Eric Trump will no longer be able to delay his interview and will be sitting down with investigators in my office no later than October 7. To be clear, no entity or individual is allowed to dictate how or when our investigation will proceed or set the parameters of a lawful investigation. The court’s order today makes clear that no one is above the law, not even an organization or an individual with the name Trump.”

James had also sought to enforce compliance with subpoenas for thousands of documents and testimony from other witnesses related to Trump properties. Her office noted Wednesday that the ruling will give her access to documents that have been “withheld by the Trump Organization.”

CLICK HERE FOR THE FOX NEWS APP

The attorney general’s office is also attempting to collect information about several other Trump-related properties, including the Trump National Golf Club near Los Angeles, the Trump International Hotel and Tower in Chicago and an office building on Wall Street in Manhattan where the Trump Organization “owns a ‘ground lease’ pertaining to the property.”

Fox News' Andrew O'Reilly contributed to this report.