A Salt Lake City police officer searching for a missing 3-year-old boy acted reasonably when he entered a fenced Sugar House yard and fatally shot a large barking dog running toward him, a federal appeals court ruled Tuesday.

In a 3-0 decision, the 10th U.S. Circuit Court of Appeals agreed that Officer Brett Olsen did not violate the constitutional rights of Sean Kendall by entering his yard on June 18, 2014, without a warrant and shooting Geist the dog.

Salt Lake City police Sgt. Brandon Shearer said Tuesday that the officers were concerned about the missing child and that the ruling shows they “were there doing what they needed to do.” Paul Murphy, a spokesman for Salt Lake City, said the situation was “highly critical.”

“A missing child is a child who is in danger until they are found,” Murphy said. “What happened to Geist was an unfortunate situation, but we believe the court ruled correctly the officer acted in a reasonable manner when he was faced with a dog that was about to attack him.”

Kendall’s attorney, Rocky Anderson, said they intend to appeal the decision, possibly to the entire 10th Circuit. He called the ruling “yet another enormous step toward a totalitarian police state, where citizens’ privacy rights and the right to be left alone by government agents are eviscerated by the police and the courts.”

Kendall sued the city and five of its officers in Utah’s 3rd District Court in October 2015. The lawsuit, which involved state and federal defendants, sought about $2 million for the loss of Geist, a 2-year-old Weimaraner. The lawsuit says that police were not trained to deal with dogs and that Olsen violated Kendall’s Fourth and Fifth Amendment rights against illegal search and seizure and due process when entering the yard without sufficient cause.

The case was moved to U.S. District Court, where Judge Robert Shelby ruled in February 2017 that the shooting was justified and that Olsen had immunity against the federal constitutional claims.

The ruling sent the case back to 3rd District Court to resolve the allegations against the state, and Kendall appealed to the 10th Circuit Court the decision involving the federal government. The state case is pending.

In upholding Shelby’s ruling, the 10th Circuit Court said Olsen’s entry into the yard and the shooting were reasonable under the circumstances: A 3-year-old boy who was not able to communicate verbally had been missing for an hour, and the chances of finding him unharmed were decreasing rapidly. Kendall’s residence was about 10 houses from the boy’s home, and the yard may have been accessible because one or more of the gates was unlocked and a child could reach the latch.

Also, Olsen has testified that a growling Geist charged him with his ears back and teeth bared, the ruling says, and that he fired his service weapon when he realized he would not be able to outrun the 90-pound dog. There were no witnesses to the shooting.

Kendall does not dispute that Geist barked loudly at Olsen and chased him, but he disputes the rest of the officer’s description of the encounter, saying his pet was a friendly, nonaggressive animal.

The disagreement over how the dog acted did not sway the 10th Circuit Court’s decision.

“Even under Kendall’s version of the facts, however, Geist, a large dog, appeared suddenly approximately 20-25 feet from Olsen, barking loudly, and then ran at Olsen when the officer started to run from him,” the ruling says. “Under these circumstances, Olsen would have had only a few seconds to react to the rapidly approaching dog. Under these circumstances, an officer could reasonably believe that Geist posed an imminent threat to his safety.”

Anderson said Shelby’s ruling and the appeals court decision “mean that no one’s home or enclosed property is ever safe from warrantless searches by police, regardless of whether the occupant is home.”

“These decisions, for the first time in our nation’s history, hold police officers can search hundreds or thousands of homes and enclosed backyards that are (1) within the ever-growing area a missing person could travel within the time he or she is missing and (2) believed by police to be accessible to the person missing­,” Anderson said in a written statement.

The boy was found asleep in the basement of his home soon after the shooting. A review by the city’s Police Civilian Review Board found that Olsen did not violate department policies.