CLEARWATER — A man who crept into a sleeping couple's home died early Tuesday after the husband hacked him repeatedly with a machete kept under the bed, according to the Pinellas County Sheriff's Office.

Sheriff's deputies say Steven Aiosa retrieved the machete after a rifle also stashed under the bed malfunctioned and the intruder began attacking his wife.

Aiosa and his wife, Heather Aiosa of 3063 Terrace View Lane off McMullen-Booth Road, told deputies they had gone to bed around midnight. They awoke around 2 a.m. Tuesday to find a stranger standing in their bedroom doorway.

Deputies say the man, later identified as Robert James Alcalde, 31, who lived at an apartment complex less than a mile away at 1319 N McMullen-Booth Road, broke into the home through a front window.

Alcalde was behaving "very characteristic of people who have taken drugs," Sheriff Bob Gualtieri said during a Tuesday afternoon news conference. As he stood in the bedroom, Alcalde told Heather Aiosa, 40, he had already called 911 because he believed someone was trying to kill him.

Gualtieri said the couple told investigators Alcalde began acting paranoid and irrational, crouching in the corner of the room before throwing things off shelves and trying to climb the walls.

The sheriff said Steven Aiosa, 43, grabbed a .22-caliber rifle from under the bed and walked with his wife out the home's back door to the back yard to try to load it. But the gun was malfunctioning and he couldn't get a round in the chamber.

Aiosa left his wife outside and went back to the bedroom to grab the machete. When he went back outside, Alcalde followed.

"He tackled (Heather Aiosa) to the ground," the sheriff said. "It was a very, very violent struggle at this point. There was a lot of fighting — active fighting, brawling."

To defend his wife, Steven Aiosa started striking Alcalde with the machete, giving him severe gashes all over his legs, Gualtieri said, but Alcalde continued to fight.

Deputies soon arrived and fired an electronic weapon at him, hitting Alcalde six times before he showed any change in behavior and was able to be handcuffed, Gualtieri said.

He called it an "extremely bloody situation" and said Alcalde suffered gaping wounds on both his legs.

Paramedics treated the injuries and gave Alcalde medication outside the home, but he stopped breathing on the ride to Northside Hospital in St. Petersburg, where he was pronounced dead, Gualtieri said. The Aiosas were uninjured.

Gualtieri said Clearwater police had responded to Alcalde's apartment complex an hour before the break-in after receiving a report that he was behaving strangely.

"A witness said he was walking around the apartment complex talking to himself, talking about someone being after him who was going to come kill him," Gualtieri said. He said the officer left because Alcalde did not appear to be a danger to himself or others.

Alcalde had an extensive criminal record dating to 2003. It shows charges of trespassing, DUI, credit card fraud, fleeing and eluding arrest, unlicensed telemarketing and several counts of burglary and battery. Alcalde's father, Robert Alcalde, told investigators his son was on a "slippery slope" and it was "only a matter of time before he went back to jail or was dead," the sheriff said.

Robert Alcalde told the Tampa Bay Times Tuesday that he thinks his son started using prescription drugs a year or two ago and it just went downhill from there.

"My son was a mess," he said.

Gualtieri said the investigation is ongoing, and the Sheriff's Office will be in communication with Clearwater police about their interactions with Alcalde before the incident, but he is sure nothing could have been done differently.

"He didn't meet the criteria for an involuntary examination under the Baker Act," the law that allows law enforcement to detain someone having a mental health crisis that could be dangerous to themselves or others. "If someone hasn't broken the law and doesn't meet the criteria, there isn't any (law enforcement) can do."

Times researcher Caryn Baird contributed to this report. Contact Megan Reeves at mreeves@tampabay.com or (727) 445-4153. Follow @mreeves_tbt.