Trump disavowed the nuclear deal months earlier.