A Wrexham binman who researched bomb attacks on UK military targets and Downing Street security has been jailed for five years and four months.
Aabid Ali - known as Darren Glennon before he converted to Islam - told his wife he wanted to bomb an RAF base.
He was arrested in November after radicalisation concerns were raised and pleaded guilty to a number of offences.
The judge at Manchester Crown Court said Ali "plainly intended to encourage terrorism".
The court heard that Ali's wife worked at an army barracks.
Last year he was visited by officials over support for so-called Islamic State.
Ali, 49, from Yale Park, Wrexham, told them he converted to Islam while serving a prison sentence about 20 years ago. He believed in Sharia Law, and the UK military was a "legitimate target".
The court heard that despite being offered assistance by the prevent programme officers in October 2016, "the defendant remained unswerved in his beliefs".
The prevent programme is part of the UK government's counter-terrorism strategy, and tries to identify those at risk from radicalisation.Image copyright North Wales Police
The court heard that security at his wife's workplace was heightened.
Ali had told her he wanted to kill a soldier with a car. He also told her he wanted to bomb an RAF base.
He had researched bomb-making on the internet, as well as travelling to Afghanistan and Pakistan.
He had also researched GCHQ and spying, SAS barracks, IS-related material, executions, and "security arrangements at 10 Downing Street".
Following his arrest he was asked if he had suicidal intentions, to which he replied: "Only as a martyr to jihad."
Ali followed the court proceedings via video link from HMP Chelmsford.
He pleaded guilty at an earlier hearing to two offences of having Isis publications, bomb making manuals, useful for terrorist purposes and a further count of encouraging terrorism, all committed last autumn.
Jailing him, Judge Stockdale QC said Ali was responsible for "extremely serious offending" and was "fixated on terrorism and extremism".
He said Ali remained "deeply radicalised" and wanted to indoctrinate others through his postings on social media.
A previous court hearing was told he published a statement on YouTube encouraging others to take up jihad and terrorism.
Speaking after the sentencing, North Wales Police said Ali's arrest followed an intelligence-led operation between the Wales Extremism Counter Terrorism and West Midlands Counter Terrorism units.
"North Wales Police has strong links with the Muslim community and members of that community have worked with us to provide support to this investigation," said Assistant Chief Constable Richard Debicki.
"Extremism and radicalisation is something that we continue to be constantly vigilant about.
"We also work hard to ensure that efforts to victimise or commit hate crime against Muslim communities across north Wales are met with a no tolerance approach. It is crucially important that this work continues."