The proposed algorithm contributes towards an automated power distribution system, which optimally restores the power supply of the network by changing the existing topology, during an unplanned power outage. By automatic reconfiguration of the network, a fault can be isolated and power can be supplied to customers who are downstream of the fault section. BPSO technique has been implemented, which ensures maximum customer connectivity and minimum power losses while maintaining a radial topology which has acceptable voltage profile, allowable thermal limits and protection selectivity. Simultaneously, new protection settings are generated for the proposed network topology, thus preventing any compromise to grid's integrity. The proposed algorithm was tested for an IEEE 33-bus distribution network on MATLAB simulation platform. The generated network configuration achieved an optimal post-fault topology. The proposed algorithm automates the process of power restoration and thereby reduces the work for engineers and improves the reliability of distribution networks.