A federal judge on Wednesday tossed out a U.S. Justice Department lawsuit seeking to compel former casino magnate and prominent Republican donor Steve Wynn to register as a foreign agent for allegedly lobbying the Trump administration on behalf of China.

U.S. District Judge James Boasberg of the District of Columbia granted Wynn’s motion to dismiss without considering whether he acted as an agent for China, ruling that because Wynn’s alleged relationship with the Chinese government ended in 2017, the Justice Department could not force him to register now.