Homeland Security Secretary John Kelly on Tuesday defended President Trump’s executive order instituting a ban on foreign nationals from seven Muslim-majority countries. The ban, which caused chaos across the U.S. at airports over the weekend, has been criticized on both sides of the aisle. In a press conference, Kelly said his department knew the executive order was coming and that Homeland Security staffers were involved in drafting it. Reports had suggested that the department was blindsided by the order. “This whole approach was part of what then-candidate Trump talked about for a year or two,” Kelly added. “So we knew it was coming. It wasn’t a surprise it was coming. And then we implemented it.” He also responded to claims from Democrats that the executive order amounts to a ban on Muslims. “This is not—I repeat, not—a ban on Muslims,” Kelly said, adding that religious liberty is a “fundamental treasured value.” Republicans on Capitol Hill have criticized the executive branch for how the directive was implemented, noting that legal permanent residents and valid visa holders were detained and others were blocked from boarding flights to the U.S.