CNN  — 

The man who authorities think shot a state trooper and a sheriff’s deputy Friday morning surrendered after a long standoff at a home in rural Missouri, the highway patrol said.

James D. Cummings, 31, gave up without incident, Missouri State Highway Patrol Cpl. Dallas Thompson said.

Thompson said Cummings lived at the home near Van Buren and law enforcement officers were there to serve him civil legal papers.

About eight hours earlier, troopers and deputies were attempting to talk to a man in the house when he surprised them with gunfire, the state patrol said in a statement.

One Carter County deputy and a trooper were wounded. The trooper was treated and released from a hospital, while the deputy is in stable condition at a St. Louis hospital, he said.

Gov. Mike Parson called the shooting an “ambush.”

The governor tweeted: “Both officers were wounded & are hospitalized. Missouri officers are devoted to making our state safer despite the risks they face every day. #BacktheBlue.”

Van Buren is 145 miles southwest of St. Louis.