JERUSALEM - Striking Israeli dockworkers defied a court order on Thursday and shut down the country’s two main seaports for a second day in protest at the creation of two new foreign-run ports. Spokesmen for the ports of Ashdod and Haifa said 2,400 workers had left their posts and union leaders had gone underground. Forty ships were stuck at quays or off the coast waiting to be unloaded. “The workers made a serious mistake this time,” said Transport Minister Israel Katz. “If needed, we will declare a state of emergency and enforce the law on whoever doesn’t follow it.” The government, frustrated by labour disputes that have disrupted Israel’s trade arteries for years, signed contracts with two foreign companies on Thursday to operate terminals adjacent to the state-run ports of Ashdod and Haifa. China’s Shanghai International Port Group (SIPG) will operate a private port in Haifa and the Netherlands’ Terminal International Ltd (TIL), owned by the shipping giant MSC, will run a port to the south in Ashdod. The government says the new ports will lower the cost of goods across the board. Two Israeli labour courts earlier in the day ordered all port employees back to work and the Histadrut Labour Federation, the umbrella union for hundreds of thousands of public sector workers, urged employees to obey the court decisions. The striking workers, now potentially facing criminal charges, said the new competition would hurt their livelihood and insisted their walkout would continue. “The heads of the union went underground. They cannot be reached,” said Haifa ports spokesman Zohar Rom, adding that the ports would seek contempt of court action should the strike go on. He said management had sent text messages to all workers to return to work, while knocking on union leaders’ doors with the court order. The head of the workers’ committee in Ashdod suddenly resigned on Wednesday.