A man who was hitchhiking across the country for a memoir called "Kindness in America" was shot along a rural highway in northeastern Montana, police there say.

Ray Dolin, 39, of West Virginia, approached a pickup truck on Saturday near Glasgow, Mont., thinking the driver was offering him a ride, Valley County Sheriff Glen Meier told The Associated Press. Dolin was shot in the arm.

[Related: How to travel 25,000 miles without a penny]

The alleged shooter, Lloyd Danielson of Washington state, drove off and was arrested four hours later near Culbertson, Mont., 100 miles away. He's being held on suspicion of felony assault with a weapon and driving under the influence. Authorities say Danielson, 52, was under the influence of drugs or alcohol and apparently headed to Williston, N.D., for work tied to the oil boom. Williston is home to the Bakken oil patch, which stretches across western North Dakota, eastern Montana and southern Saskatchewan.

Dolin was hospitalized and is recovering. According to the Great Falls Tribune, his injuries were "non-life threatening."

[Related: China closes Tibet to tourists]

"It's totally random," Meier said. "He was sitting down to have a little lunch and this guy drives up. He thought he was going to give him a ride and as he approached the vehicle, the guy pulls out his weapon and shoots him. It's as simple as that."

Meier added: "We're still the wonderful people in Montana we've always been, and we'll get through this."