The State Department is ordering non-essential diplomats and staff at the U.S. Embassy in Venezuela to leave the country.

The department says it’s taking the step for security reasons and that the embassy in Caracas will stay open.

The move follows the Trump administration’s rejection of Venezuelan President Nicolas Maduro’s order to break relations with the U.S. and for American diplomats to depart by the weekend. The administration says Maduro’s order isn’t legal because the U.S. no longer recognizes him as Venezuela’s legitimate leader.

On Wednesday, President Donald Trump recognized the opposition leader and head of Venezuela’s parliament as the interim president. That prompted Maduro to sever relations with Washington.