SHALIMAR, FL -- A gunman fatally shot a sheriff's deputy outside a lawyer's office Tuesday and then barricaded himself inside a motel, where he exchanged gunfire with other deputies and was killed, authorities said.Okaloosa County Deputy Bill Myers, 64, was shot multiple times in the back of the head and in the back by 33-year-old Joel Dixson Smith, Sheriff Larry Ashley said. Smith had gone to his lawyer's office to be given a domestic violence injunction by Myers and turn over firearms, Ashley said.As they went to get the guns from Smith's car, Smith drew a concealed weapon and shot Myers multiple times, Ashley said.Smith "was a sick little coward," Ashley said, holding back tears.Smith, a postal worker, then fled in his vehicle, heading to a Comfort Suites about 10 miles away in Niceville, where he had previously rented a room. He barricaded himself inside and deputies fired tear gas into his room. He charged out firing and was shot by deputies, Ashley said.No one else was hurt.Myers had retired in 2013 but started working part-time in January serving civil papers to earn extra money to take his granddaughter to Walt Disney World, the sheriff said.Dixon had been arrested in 2008 for domestic battery, Ashley said, but had no other details. Postal officials had no immediate comment on his employment.Annie Allen works at an awning business next to the law firm. Allen said she and her boss were starting their day when six to eight gunshots rang out."We heard 'pop, pop, pop,'" she said.Allen said she called 911, and her boss ran outside, where he encountered the gunman leaving the law office.Her boss took pictures with his cellphone and followed the gunman in his car, Allen said."The guy got in his truck and just tore out of the parking lot," she said.Allen said she saw the sheriff's deputy on the ground moments later."When I realized it was an officer that he shot, that's when it really hit me how dangerous it was," she said.Electric company crews were working nearby, and those men also called 911 and stayed with the deputy until help arrived, Allen said.She said she and her boss talked to investigators and gave them the cellphone photos and license plate information.Hours later, Allen was still visibly shaken."When someone shoots a law officer, they have nothing to lose," she said. "It is good more people weren't hurt."A Comfort Suites guest, David Bump of Ozark, Alabama, said he awoke Tuesday to deputies pounding at his room."I opened the door and they had their guns drawn," he said.Bump said officers took him and other guests across the street, where they spent hours watching the standoff."When they brought the guy out, he was on a gurney with his face covered," said Bump, who was working in the area as part of a construction crew.He sat in the parking lot later, watching investigators enter and exit the hotel."They just now let me go back in and get my cellphone and cigarettes," he said.