Spanish police have thwarted a planned attack on Spanish Prime Minister Pedro Sanchez, authorities confirmed on Thursday.

Catalan police tweeted they had arrested a man who “wanted to kill’’ Sanchez and found a large stash of weapons at his home.

“The man was arrested recently in the Catalan town Terrassa on suspicion of planning the attack,’’ the police said in separate statement in Barcelona.

The man allegedly wanted revenge for the Spanish government’s plans to exhume and relocate the remains of former Spanish dictator, Francisco Franco.

Franco has since his death in 1975 been buried in a massive mausoleum at the Valley of the Fallen, a memorial site North-West of Madrid.

The 63-year-old had a licence for the large amount of weapons found at his home. Police found 16 firearms, including snipers and an assault rifle.

The suspect worked for a private security company.

According to media reports, he had announced his plans to assassinate Sanchez on social media.

“He has already been brought before a judge and is currently in prison in Terrassa,’’ a spokeswoman for the Catalan Justice Department told dpa.

Get more stories like this on Twitter & Facebook

AD: To get thousands of free final year project topics and other project materials sorted by subject to help with your research [click here]