Merced police responded to the 1400 block of East 21st Street at around 3:20 Friday afternoon for a man that was seen with a gun.
Police responded and attempted to make contact with the man but he ran inside the home.
Authorities were outside the home for a few hours attempting to get the man to surrender but kept coming in and out of the home several times.
After several hours, the man eventually surrendered and was taken into custody.
No further information is currently available.