Suspect in custody after standoff lasting several hours; wounded officer in stable condition