The out-of-character messages appeared on Labour Party leader Jeremy Corbyn's Twitter feed late on Sunday, but were soon erased.
Twitter issues warnings of 'state-sponsored hacking'
No one has claimed responsibility for the prank.
"davey cameron is a pie" one of the messages read, while another used foul language to make reference to Corbyn's opposition to Britain's nuclear defence system.
The tweets were shared hundreds of times before being erased and Internet users were soon sharing screenshots of the offending messages.
US Central Command Twitter feed, YouTube hacked by IS sympathisers
Britain's Press Association quoted an unnamed source close to Corbyn on the incident.
"At least they weren't subtle," the source said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ