Dueling ports underline China-India rivalry from Asia Times
More on Chabahar port from Wikipedia: "Development of the port was first proposed in 1973 by the last Shah of Iran, though development was delayed by the 1979 Iranian Revolution. The first phase of the port was opened in 1983 during the Iran–Iraq War as Iran began shifting seaborne trade east towards the Pakistani border in order to decrease dependency on ports in the Persian Gulf which were vulnerable to attack by the Iraqi Air Force.
India and Iran first agreed to plans to further develop Shahid Beheshti port in 2003, but did not do so on account of sanctions against Iran. As of 2016, the port has ten berths. In May 2016, India and Iran signed a bilateral agreement in which India would refurbish one of the berths at Shahid Beheshti port, and reconstruct a 600 meter long container handling facility at the port. The port is intended to provide an alternative for trade between India and Afghanistan. This port is 800 kilometers closer to Afghanistan than Pakistan's Karachi ."
Check also the Wikipedia article on Gwadar port.