A new law has taken effect in New Jersey that will let anyone run simultaneously for the White House and Congress, a change that will benefit 2020 White House hopeful Cory Booker, D-N.J.

Democratic New Jersey Gov. Phil Murphy signed the measure into law on Thursday. The law is nicknamed "Cory's law" because it's widely expected to be used by Booker, who will also be up for re-election in the Senate in 2020.

The law makes it clear that anyone running for Congress and the White House won't face any legal challenges due to a state law that says no one is allowed to hold more than one state-wide office at a time, according to NJ.com.

Under the law, Booker could run for both, and if he runs for both and wins, he'd only have to give up his Senate seat to become the nation's commander in chief.

Republicans argued that Democrats opposed a similar change to the law when it was thought that Chris Christie might run for president while he was governor of the state.

A New Jersey state senator, Gerald Cardinale, told Politico that Booker should be brave enough to choose one race.

"Spartacus had the courage to make decisions," Cardinale told Politico, mocking Booker's self-referential claim that he was like Spartacus during Supreme Court nominee Brett Kavanaugh's hearing for bringing up information that might hurt the nominee.