The woman making the call told officers her ex-boyfriend was threatening to kill her and her children and that he was hiding in the attic.
Police tried to persuade the man to come down and surrender, but after two hours of fruitless effort, police requested the SWAT team.
The specially trained officers responded with their team, including hostage negotiators, and took over the situation.
Five hours after the initial call, the suspect finally surrendered without injury.
He was identified as Daniel Calderon, 24, of Riverside. No gun was found.
However, police say they found narcotics, money and brass knuckles.
Calderon was booked for terrorist threats, resisting arrest and possession of narcotics for sale.