A cargo ship has crashed into a historic mansion on Istanbul's Bosporus strait, severely damaging the building.

Turkey's official Anadolu news agency said the Maltese-flagged cargo ship had a malfunction Saturday that disabled its rudder and caused it to lose control in the busy waterway.

A tanker has crashed into a historic mansion on Bosporus strait, severely damaging the building, in Istanbul, Saturday, April 7, 2018 Turkey's official Anadolu news agency said the Maltese flagged ship's main machinery stopped Saturday, disabling its rudder and causing it to lose control. No one is reported injured.(DHA-Depo Photos via AP) (AAP)

Videos showed the large ship sailing straight toward the Asian shores of Istanbul, hitting the red seaside mansion of Hekimbasi Salih Efendi. No one was injured.

Anadolu said the 225-meter (738-foot) ship was carrying barley from Russia to Saudi Arabia.

A damaged waterside building after a tanker crash under the Fatih Sultan Mehmet bridge near the Bosphorus in Istanbul, Turkey, 07 April 2018. According the media reaport there has been no deaths or injuries in crash. EPA/MUHAMMED (AAP)

The mansion once belonged to a doctor who served in the Ottoman palace and dates back to the 18th century.