Security forces were carrying out an operation in the Aida refugee camp near Bethlehem when they were attacked by a man holding a pipe bomb.
The soldiers shot the terrorist in the leg without sustaining any casualties themselves.
The bomb was neutralized by explosives experts on the scene.
The terrorist is considered lightly wounded and is now being held at a nearby checkpoint. He is being treated for his wound and will be sent to a hospital for further treatment before being taken in for interrogation.