FREMONT (CBS SF) — A burglar who was caught on video breaking into and stealing from a home being fumigated with a hazardous chemical collapsed and later died after leaving the property, police said.

The apartment building located in the 39800 block of Fremont Boulevard was being fumigated for bed bugs and was covered with a tent.

The residents shared the surveillance footage from the camera they purchased just days earlier out of fear one of the fumigation workers might steal from them. What they wound up seeing was even more shocking.

With a mask over his face, the burglar clearly knew he was in a dangerous space. Using the flashlight on his phone, he is seen taking him time rummaging through a console.

He casually walks into the bedroom after making a stop in the kitchen. He spends about 30 to 40 minutes in the apartment, eventually winding up back in the living room where he places the valuables he found in a bag he came with – all the while ignoring clear warning signs that no one should be inside.

Eventually he hops out of a window of the first floor apartment, but he doesn’t get very far.

“He had some labored breathing and he was also sweating,” said Geneva Bosques of the Fremont Police Department. “He wasn’t able to communicate really well or at least not really clear.”

The family who lives in the home said he stole an iPhone, an iPad, and other electronics.

Fremont police said officers found him outside the complex after a 911 call came in shortly after 2 p.m. He later died at the hospital. “Do Not Enter” signs announcing the presence of the chemicals sulfuryl fluoride and chloropicrin were posted at the scene.

The coroner’s office identified him as 24-year-old Markangelo Yap.

Before he collapsed, Yap also ransacked Melissa Genberg’s apartment, not far from where he was caught on surveillance video.

“I can’t believe that person who was in our apartment is dead,” said Genberg.

Police said they also found a backpack with goods near a trash can in the complex around the time Yap was found. They’ll check to see if any of the items belong to residents.