Phoenix police officers leave the scene of a standoff with a former Maricopa County sheriff's deputy early Monday morning. (Source: CBS 5 News)

PHOENIX (CBS5) -

An ex-Maricopa County sheriff's deputy was found dead late Thursday afternoon after authorities went to his home to serve him with a felony warrant, Sheriff Joe Arpaio said.

Arpaio said Ramon "Charley" Armendariz, 40, apparently hung himself.

Law enforcement officers had been to his home four times in the past nine days.

Armendariz was supposed to get an ankle monitor Wednesday but never showed up to get it.

He involved Phoenix police and MCSO in a standoff Monday morning that ended peacefully.

"We found marijuana, heroin, methamphetamine and that's what he was booked on," said Maricopa County Sheriff Joe Arpaio.

Armendariz had barricaded himself into his residence near 31st Avenue and Thunderbird Road on Sunday evening, but eventually walked out of his home just after 1 a.m. and was taken into custody and to a psychiatric unit for evaluation, said Phoenix Police Officer James Holmes.

According to the Maricopa County Sheriff's Office, Armendariz has been under investigation since May 1 when he called Phoenix Police to report a burglary in progress.

When police arrived they found Armendariz armed with a pepper ball gun and chasing a phantom burglar, according to Deputy Joakin Enriquez.

"Police found out he was a sheriff's deputy and contacted us," Enriquez said.

Detectives issued a search warrant late last week and carried away bags of evidence, according to neighbors. Deputies said they found methamphetamines and drug paraphernalia inside Armendariz's home.

Deputies say Armendariz resigned from his position on Friday after nine years of service with the Maricopa County Sheriff's Office.

Armendariz was formerly part of Sheriff Joe Arpaio's human smuggling unit. As a member of this unit, Armendariz was asked to testify in a lawsuit against the sheriff's office alleging deputies used racial profiling to arrest dozens of illegal immigrants.

Following his testimony, Armendariz left the human smuggling unit.

"This [arrest] comes as a surprise," Enriquez said. "[Armendariz] had a very good report with the community as well as fellow deputies."

Armendariz, who is openly gay, participated in the Phoenix Pride Parade while in uniform in 2012 alongside other MCSO deputies and members of the Mesa Police Department.

The drug allegations against Armendariz remain under investigation.

For more on this story and other stories around Arizona from this author, follow Shawn Kline on Facebook and Twitter.