The standoff began around 1:30 pm in the area of Willow Avenue and Friant Road.
The Fresno County Sheriff's Office says the suspect was firing a gun inside his home, causing a woman to run outside to safety.
When deputies arrived, they reported hearing more gunshots coming from inside the home.
The standoff ended around 2:45 pm when deputies took the suspect into custody.