The Second Circuit Court of Appeals on Monday ruled that President Trump must turn over eight years of his tax returns to a state grand jury, according to the New York Times.

Why it matters: Trump's attorney Jay Sekulow said after the ruling that the president's legal team is appealing the case to the Supreme Court, according to Politico's Darren Samuelsohn.

Details: The court dodged Trump's legal team's argument that he is immune from criminal investigations while in the White House, saying instead that the president’s accounting firm is being subpoenaed for the documents — not Trump himself.

Background: The legal fight over Trump's tax returns started in August when Manhattan District Attorney Cyrus Vance Jr. subpoenaed the president’s accounting firm, Mazars, as part of a criminal investigation into allegations that the Trump Organization made hush money payment during the 2016 presidential election to two women who had affairs with Trump.

Vance Jr. requested the president's tax returns and those of his family business dating back to 2011.

Michael Cohen, Trump's former personal lawyer, is currently serving out a 3-year sentence for campaign finance violations for making a $130,000 payment to adult film star Stormy Daniels and a $150,000 payment to Playboy model Karen McDougal on the condition that they did not reveal their past relationships with Trump.

Vance Jr. is investigating whether the Trump Organization falsely listed its reimbursement of Cohen for the $130,000 payment to Daniels as a legal expense.

Trump's lawyers countersued the subpoena, saying the criminal investigation of the president was unconstitutional.

Go deeper: Trump lawyer argues the president can't be prosecuted for shooting someone