The soldier was arrested immediately after the shootout and tried in a army court martial in the northern command headquarters at Udhampur.
This is only the second time, since the country's independence, that an army court has handed down such a severe punishment to a soldier.
Early in 2006, another summary court martial awarded capital punishment to a trooper who had killed his commanding officer in a Rashtriya Rifles camp at Harwan on the outskirts of summer capital Srinagar in 2006.
Experts blame long separation from families and continuous discharge of duty in hostile condition for such freakish behaviour among the deployed soldiers.
The authorities have also formed committees of senior defence personnel, to recommend steps for checking such behaviour among the troops.
Services of counselors among other things like increased recreational facilities, periodic leaves and permission to carry families along are some of measures suggested to check this growing tendency.
So far over 200 army and paramilitary troopers including officers have died in the friendly fire in the country during instances when irate soldiers fired at the commanding officers or colleagues.