A federal judge in Maryland blocked President Trump’s executive order giving state and local governments the ability to say no to having refugees placed in their communities.

U.S. District Judge Peter J. Messitte issued a preliminary injunction Wednesday that barred the administration from implementing the president’s order. He said refugee-resettlement organizations that sued to challenge the policy “are clearly likely to succeed in showing, that, by giving states and local governments veto power over the resettlement...