CANNON BALL, N.D. — Ranchers are arming themselves before they climb onto tractors or see to their livestock. Surveillance helicopters buzz low through the prairie skies. Native Americans fighting to prevent an oil pipeline near the Standing Rock Sioux Reservation are handing out thick blankets and coats and are building maple-pole shelters that can withstand North Dakota’s bitter winter.

As the first deep freeze looms, many here are bracing for a long fight as the company behind the Dakota Access pipeline races to finish the $3.7 billion project by January, and thousands of protesters tucked into tents, tepees and trailers in prairie camps vow to stop it.

“This is where we are, and where we’re staying,” Retha Henderson said, surveying a bustling camp on the edge of the Cannonball River. “We’re not giving up.”

Ms. Henderson said she had been drawn to the site by memories of her grandfather, an Oglala Lakota, and by dreams. She left her apartment and her catering job in Myrtle Beach, S.C.; gave away her cat; and hitchhiked to the Sacred Stone Camp.