Late on Wednesday "we received word that a boat had hit a railway bridge that links the town of Aalborg with that of Lindholm", crossing the Lim Fjord in the north of the Jutland peninsula, local police chief Per Joergensen said.
"The bridge was so damaged that it will not be possible to use it for the next six months. This will cost millions [of kroner, hundreds of thousands of euros/dollars]," he said, pointing out that all passengers travelling from Aalborg towards the north will have to be transported by bus.
Per Vagn Nielsen, a duty officer with the local police in northern Jutland, meanwhile told public broadcaster TV2 News that a train had been just a minute from the bridge when the accident had happened on Wednesday night.
"The train could have derailed and gone into the water. That would have been the worst imaginable scenario," he said.
The 75m cargo ship, which is registered in Finland and called Ramona, was not damaged, Joergensen said.
The ship will however remain anchored in the Aalborg port until the cause of the accident has been determined, he said, adding he did not know how many people had been aboard at the time of the crash.
Neither the the ship's captain nor the bridge operator were intoxicated, Joergensen said, speculating that the accident may have been due to miscommunication between the two.