Updated

A gunman fatally shot a Florida sheriff's deputy outside a law firm Tuesday morning before barricading himself inside a motel and exchanging gunfire with other deputies before he was killed, officials said.

Okaloosa County Sheriff Larry Ashley said Deputy Bill Myers died after being shot multiple times in the back of the head and in the back by Joel Dixson Smith.

The initial shooting occurred in Shalimar around 8:20 a.m. Tuesday, according to an Okaloosa County Sheriff’s Office news release.

Smith originally went to his lawyer's office to be given a domestic violence injunction by Myers and turn over firearms to him, Ashley said in a news conference Tuesday afternoon.

As Myers went with Smith to get the guns from Smith's car, Ashley told reporters that Smith drew a concealed weapon and shot Myers multiple times. Myers was taken to a hospital where he died.

"He was a sick little coward," Ashley said.

Smith was located shortly after the shooting at a Comfort Inn and Suites in Niceville, where he had barricaded himself in a room. The suspect exchanged gunfire with police, though no members of the OCSO Special Response Team were injured, WEAR reported.

Myers, 64, 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, Ashley said.

Dixon, 33, had been arrested in 2008 for domestic battery, but officials had no other details on the incident.

The Associated Press contributed to this report.