The Trump administration and the sheriff in Portland, Ore., agree on this much: The crimes were hideous and preventable. But they are fiercely blaming each other for allowing them to happen.

The case has stirred up a tempest because the man accused of crawling through the bedroom window of a 65-year-old woman, tying her up and raping her is an illegal immigrant, Sergio Jose Martinez, who has been deported to Mexico 20 times and has been arrested 10 times this year.

Under political fire for releasing Mr. Martinez after his most recent stint in jail, the sheriff declared that President Trump’s immigration agency was at fault for failing to provide a legal basis for holding him longer, while the White House blamed the sheriff for letting him go.

Cases like that of Mr. Martinez around the country are inciting outrage, amplified by an administration that is eager to expel undocumented immigrants.