A combination theorem for negatively curved groups