BERKELEY-- A burglary suspect armed with a machete and a saw who holed up in an unoccupied house was arrested and taken for a psychiatric evaluation after a 3½ hour standoff with Berkeley police officers and a SWAT team.

No shots were fired, and the standoff ended when the man came out of the house on his own. Police arrested him after a brief scuffle. The suspect received only minor injuries.

Authorities said Kamal Abdul Khalid, 65, came out of the Parker Street home with the machete in his hand about 10:20 a.m. after the SWAT team was seen running into the house.

After dropping the machete, Khalid put up a fight before being arrested and suffered minor injuries, Berkeley police Sgt. Mary Kusmiss said.

The story unfolded about 7 a.m. when Shedrick Gandy confronted the burglary suspect in his basement in the 1300 block of Parker Street, he and Kusmiss said.

"He was trying to take a bike, and I said, 'Uh-uh, you can't take that,' so he grabbed the machete and the saw, and I followed him out with the baseball bat," Gandy said.

Ronnie Jackson was just coming back from his daily breakfast at McDonald's on San Pablo Avenue when he saw Gandy and the suspect squared off in the middle of the street, one man with a baseball bat, the other with a machete and a saw.

"Then the cat with the saw started taking off his clothes and for some reason he had on two pair of pants," Jackson said. "Then he ran across the street and beat his way into the house with the machete."

Kusmiss said that when police arrived on the scene and ordered Khalid to put down the weapons, he instead ran to a house across the street from the one he broke into, smashed the window in the front door with his machete and jumped through the broken glass.

About three hours later, when the SWAT team took Khalid into custody, they saw what appeared to be blood all over the home. Police at first thought it was the suspect's blood, but it turned out to be blood from some steaks and juice from strawberries that the suspect may have removed from the refrigerator.

At the scene, about 15 SWAT team members, several detectives, other sharpshooters with rifles, and a fire truck and ambulance were standing by.

"I'm really happy the way the Berkeley police handled this," Gandy said. "They were very patient with the guy, because he needs help."

Doug Oakley covers Berkeley. Contact him at 510-843-1408. Follow him at Twitter.com/douglasoakley.