BAGHDADI, Iraq — As he hunted for a seasonal delicacy, Mohaned Salah Yasseen scanned the ground intently, searching for places where the soil is cracked and slightly raised — the telltale sign a desert truffle lies below.

So he failed to notice the two pickup trucks, driven by men in military uniforms, until they were almost upon him.

“They ordered me to get into the truck,” said Mr. Yasseen, a 31-year-old pharmacist. “I thought about saying no, but they were armed.”

As he climbed in, he became the latest victim in a new campaign by the Islamic State.

Driven out of most of the territory it controlled in Iraq and Syria, the group has gone underground, its remaining fighters in Iraq carrying out sporadic attacks.