Despite long-standing assurances from the State Department that the US would take no stance on the upcoming Catalonia referendum, President Trump couldn’t help himself while hosting Spain’s Prime Minister, loudly endorsing Spanish unity.

Trump attacked the referendum effort in Catalonia as “foolish,” saying the people of Catalonia should accept a united Spain. Spanish PM Mariano Rajoy insisted the vote wouldn’t count anyhow.

Catalonia’s referendum on independence is scheduled for Sunday, despite Spain prohibiting it from happening. The signs are that the vote will take place over their objections, however, and attempted crackdowns seem to be fueling increasing resentment within Catalonia.

President Trump’s decision to chime in reflects the largely anti-secessionist views across the West right now, with many nations fearing they’d face similar votes if Catalonia succeeded. It does, however, risk making President Trump, and by extension the US, the face of anti-independence.

The timing of Rajoy’s visit suggests Spain was hoping to get Trump to endorse their moves against Catalonia, at a time when many EU nations are trying to avoid public comment on the matter.