A federal judge has ruled that former President Donald Trump’s accountants must hand over two years of his tax records to a House committee examining if he and his businesses profited off the office of the president, reported the Washington Examiner.

Judge Amit Mehta of the U.S. District Court for the District of Columbia gave the green light on Wednesday to a House Oversight and Government Reform Committee subpoena for Trump’s tax information for 2017 and 2018.

However, Mehta stopped short of ruling in favour of the panel’s full subpoena.

The committee had sought Trump's tax records going back to 2011. That request was denied by the judge who argued: “The more Congress can invade the personal sphere of a former President, the greater the leverage Congress would have on a sitting President," Mehta argued.

Mehta rejected arguments by Trump lawyers that the panel did not have the authority to demand financial records relating to his Washington DC hotel and its lease with the federal government, the Daily Mail reported.

“The committee has presented ‘detailed and substantial’ evidence that President Trump, at least through his business interests, likely received foreign payments during the term of his presidency,' wrote Mehta referring to the Emoluments Clause, a rule that bans gifts from foreign countries without approval from Congress.

'The Committee therefore is not engaged in a baseless fishing expedition,' Mehta added.

The ruling is expected to be appealed by Trump’s legal team as well as the House committee.