Two militants were shot dead in an encounter with security forces in the Ranbirgarh area on the outskirts of the Srinagar city on Saturday. The operation is continuing.