Image copyright MI5 Image caption Andrew Parker, the head of MI5, delivered a stark warning of the terror threat the UK is facing from home and abroad

Most dissident republican attacks in Northern Ireland last year were foiled, according to the head of MI5.

Andrew Parker said of more than 20 such attacks, most were unsuccessful and that up to four times that amount had been prevented.

He made the remarks during a speech in which he gave a stark warning of the dangers UK is facing from terrorism.

He said it was "unrealistic to expect every attack plan to be stopped".

Mr Parker made the speech in London on Thursday night.

He said: "Whilst there has been great progress in Northern Ireland, dissident republicans continue to carry out terrorist attacks aimed at the police, prison officers and others.

"There were more than 20 such attacks in 2014, most of which - thankfully - were unsuccessful.

"The key statistic is that for every one of those attacks we and our colleagues in the police have stopped three or four others coming to fruition.

He added: "Northern Ireland experience teaches us that terrorist threats are enduring; that it requires sustained long-term effort and teamwork to counter them; and that it's unrealistic to expect every attack plan to be stopped, even where the perpetrators may in some cases have been on our radar for many years.