LAKELAND — A domestic dispute turned into a 25-hour standoff between deputies and a man who held his 6-year-old daughter hostage, finally releasing the girl to police before fatally shooting himself Sunday afternoon.

Gary Cauley, 39, arrived at the house of his estranged wife, Amie, about 4 a.m. Saturday, according to the Polk County Sheriff's Office.

Amie Cauley and Gary Cauley started arguing "all through the morning about a variety of domestic issues," Sheriff Grady Judd said at a press conference Sunday.

Early Saturday afternoon, their daughter Rylan told her father that she and her mother planned to go to the beach that day. And Judd said they were going with a man "that Gary doesn't like." This news, the sheriff said, escalated their argument.

"Gary says, 'Well, you're not taking Rylan,'" the sheriff said.

Gary Cauley went to the garage and returned with a handgun. His wife did not know there was a firearm in the house, Judd said. The sheriff said it would have been illegal for the father, a felon, to possess a firearm. State records show Cauley was on felony probation for battery, theft and methamphetamine possession convictions.

When Gary Cauley started to hold his daughter against her mother's wishes, Amie Cauley called 911. When deputies arrived, she ran out of the house, but her husband refused to let Rylan go.

Crisis negotiators started talking to Gary Cauley, who never threatened to hurt his daughter. But inside, deputies learned later, he was shaking. Judd said Rylan told deputies she was calm but her father was clearly afraid. He talked about killing himself, she told them.

The father took his daughter to a bedroom closet where he barricaded them inside.

Judd said negotiators pleaded with Gary Cauley dozens of times to release his daughter. He kept promising he would, only to later offer excuses why he didn't.

"'I'm putting on Rylan's shoes, I'm putting on my shoes,'" deputies heard, "and this narrative went on for 24 hours," Judd said.

At 1 p.m. on Sunday, Gary Cauley finally said he would release his daughter 30 minutes later. Judd said deputies didn't believe him. But Gary Cauley followed through, and Rylan calmly walked out the front door about 1:20.

She told deputies her father's last message to her was to go to the authorities, to not be afraid, that they wouldn't hurt her.

"And then he told Rylan, 'And then I'm going to kill myself,'" Judd said.

Deputies sent a robot into the home to observe the man, alone in his wife's house with the handgun. They pumped a chemical agent through the windows to drive him outside, asking him to come to the door.

Gary Cauley, holding the handgun, walked to the door but wouldn't come out. He talked with negotiators for about forty minutes.

If he had moved the handgun even slightly, Judd said, a deputy would have shot him. But he never threatened anyone but himself. Finally, just after 2 p.m. the sheriff said, Cauley shot himself. Judd said Gary Cauley died immediately.

By Sunday afternoon, Amie Cauley and her daughter had not yet been reunited, as investigators and the Department of Children and Families talked to both of them. Judd said the Sheriff's Office would ensure Rylan received counseling.

Contact Langston Taylor at ltaylor@tampabay.com. Follow @langstonitaylor.