The Regina Baltica, en route from Stockholm to Tallinn with 373 passengers and 167 crew on board, ran aground at 10:40 pm (19:40 GMT) Tuesday, but the crew was able to free it three hours later and it sailed to the nearby Swedish port of Kapellskar.
The incident happened eerily on the 11th anniversary of the sinking of the passenger ferry Estonia, servicing the same route, in which 852 people died.
Although the ship suffered some damage, the passengers were not in danger and were not evacuated, Tallink said.
“The passengers on board the Regina Baltica were not hurt and were taken safely to the port of Kapellskar,” Tallink said in a statement.
“According to preliminary information, the ship ran aground because of engine failure, which caused a power cut, paralysing the navigation systems of the vessel,” the company said.