Donald Trump has used the Metropolitan Police's Twitter hack blunder to take another swipe at London Mayor Sadiq Khan.

The US President tweeted, 'With the incompetent Mayor of London, you will never have safe streets!' hours after the Met's official Twitter account shared a stream of obscenities.

Trump was replying to a tweet made by controversial commentator Katie Hopkins, who has also been scathing of Khan in the past.

Hopkins wrote: 'Officers says they have lost control of London streets. Apparently they lost control of their twitter account too.'

Twitter users were taken aback when a stream of bizarre and abuse messages started flooding in from the Met Police's official account at around 11pm last night.

The account, which is normally only used to update the public on ongoing policing matters, started writing tweets that said: '‘F*** the police’ and 'What you gonna do ... phone the police?'

Other tweets seemed to take aim at individuals, with one reading: ‘We are the police… Cal and Dylan are gay btw.’

Donald Trump used the Metropolitan Police's Twitter hack blunder to take another swipe at London Mayor Sadiq Khan, describing him as 'incompetent'

The Metropolitan Police lost control of their Twitter feed before midnight last night

Superintendent Roy Smith of the Metropolitan Police advised members of the public to ignore the official Scotland Yard twitter account until it was brought back under control

Some tweets targeted ongoing policing matters and called for the release of 18-year-old Drill rap artist Digga D, who is currently in jail.

Digga D, real name Rhys Herbert, is part of the '1011' drill music group from Ladbroke Grove in West London.

The group – once feted by former Radio 1 DJ Tim Westwood – have had millions of views on YouTube with tracks in the genre linked to a rise in violent crime.

Last year five members of the gang, including Digga D, were was jailed and banned from making violent videos after they were caught with machetes and baseball bats on the way to attack a rival gang in 2017.

They had got in a black car and drove towards the postcode area of their rival's, the '12 World Gang' from Shepherd's Bush, intent on revenge.

But police swooped down on them and found an armoury of deadly weapons.

A judge banned the five young men from mentioning death or injury in their songs or on social media and ordered them to inform police before they record or perform songs.

Digga D was released from prison at the end of last year but was re-arrested for an unknown crime in March this year following the release of his 'Double Tap Diaries' album.

Some tweets targeted ongoing policing matters and called for the release of Drill rap artist Digga D

Attackers also managed to hack the Metropolitan Police’s website as they were able to send ‘test’ press releases.

One, titled ‘Free Digga D’, said: ‘We aim to make London the sagest global city. Be the best crime-fighters by any measure.

‘Earn the trust and confidence of every community; Take pride in the quality of our service; so people love, respect and are proud of London’s Met’.

The cyber criminals mocked the Metropolitan Police after hacking their computer system

The posts also linked to press releases regarding the rapper and an apparently missing child.

Several other messages included abusive content.

The Metropolitan Police confirmed they had been hacked, although were unable to confirm the extent of the attack.

Dozens of nonsense messages were sent out over the period of about 30 minutes

For 30 minutes, the Met's Twitter feed and email system spewed nonsense messages

Scotland Yard's Twitter feed has more than 1.2 million followers who were bombarded with a series of increasingly bizarre messages.

It is believed the cyber criminals got access to the Met's 'MyNewsdesk' application, which automatically pushes messages out across email and their twitter feeds.

A Scotland Yard superintendent said the Met's official account has 'been subject to unauthorised access'.

Superintendent Roy Smith tweeted: '... Our media team are working hard to delete the messages and ensure the security of the account. Please ignore any Tweets until we verify that it is back under official control.'

The cyber attack quickly gained traction among social media users - who found it hilarious

The Metropolitan Police's email system, Twitter feed and website has been hacked in a late-night cyber attack

In a statement issued some two hours after the hack, Scotland Yard said: 'The Met Police Press Bureau uses an online provider called MyNewsDesk to issue news releases and other content.

'When a story is published via MyNewsDesk, it appears on the Met’s website and Twitter accounts and generates an email to those who’ve subscribed to receive our news updates.

'Last night, Friday 19 July, unauthorised messages appeared on the news section of our website as well as on the @metpoliceuk Twitter feed and in emails sent to subscribers.

'While we are still working to establish exactly what happened, we have begun making changes to our access arrangements to MyNewsDesk.

'We apologise to our subscribers and followers for the messages they have received.

'At this stage, we are confident the only security issue relates to access to our MyNewsDesk account. There has been no "hack" of the Met Police’s own IT infrastructure. We are assessing to establish what criminal offences have been committed.'