As Donald Trump gets closer to locking up the Republican nomination and therefore one step closer to the presidency, it’s worth looking back at one of the Obama administration’s most troubling legacies: specifically, the national security precedents that have allowed the US to spy on countless people and kill without accountability. The prospect now – a terrifying one – is of Trump in charge of this vast apparatus.

Civil liberties advocates have been warning of a scenario like this for more than six years. The extraordinary national security powers George W Bush pioneered and Obama shamefully entrenched could now fall into the hands of someone many people consider a madman. Someone whose opinion changes with the wind – or the sound of the crowd – and whose entire candidacy is based around personal vendettas.

Trump’s abhorrent daily pronouncements about what he would do as president come at such a rate that we have become numb to them. We’ve lost count of the amount of times he’s claimed he’ll bring back waterboarding, or some forms of torture that are “so much worse” (something that would constitute a war crime). Or that he’ll not only kill terrorists, but members of their families as well – another war crime. (After some backlash for these statements, Trump claimed on Friday that he would still “obey the law”.)

Trump’s list of enemies could make former president Richard Nixon, who saw no problem in using the NSA to spy on American dissidents and his political opponents, look tame in comparison. While one of the NSA’s mass surveillance programs was curtailed (but not eliminated) by the USA Freedom Act, there remain myriad programs that touch on vast numbers of Americans’ communications. The FBI still has carte blanche to look at NSA’s international intercepts for Americans caught up in its net, and just last week the New York Times reported that the NSA plans to remove key privacy protections from much of its surveillance data, so that it can be shared with other federal agencies without any administrative protections. Are these the types of powers we want in the hands of a Trump administration?

And then there’s war: the Obama administration has done more damage than Bush did to the constitutional principle that Congress should be the only governmental body that can declare it. The US is currently waging war in multiple countries – Syria, Iraq and Libya – using a law written 15 years ago meant for Afghanistan, to go after a terrorist organization that did not exist at the time. When President Trump decides to invade the first Middle Eastern country that looks at him the wrong way, to “take their oil”, it will be that much harder to stop him because of the precedent the current administration has set.

One shudders at the thought of what he could do with the CIA drone program. A bipartisan group of former officials recently gave the Obama administration a grade “F” for its complete lack of follow-through on any of the promises to improve accountability around the CIA and military drone strikes. Despite years of public vows, the White House has “done virtually nothing” and has instead fought transparency in court at every turn. When the drone program is handed over to the Trump administration, will Obama supporters still think it’s a good thing that the executive branch has the authority to kill US citizens in complete secrecy?

Guantánamo Bay prison, a symbol of torture and indefinite detention which should have been closed years ago, remains open. While Obama still says he wants to close it, his administration has enshrined the concept of indefinite detention into our system, and no matter who is president next has the opportunity to exploit that. Trump has vowed to expand Guantánamo, and, according to a leaked memo obtained by CNN, his campaign even said he would detain American Isis “sympathizers” (whatever that means). This would of course be illegal and unconstitutional in a variety of ways, but given that Gitmo remains open and the last two administrations have faced no consequences for their unprecedented policies, how far could Trump go before he’s stopped?

One of the major criticisms of Obama’s “look forward, not backward” policy in regards to Bush’s torture program was that by not prosecuting those involved, he essentially took what was clearly illegal conduct and turned it into a policy dispute. So right now, Obama is free to ban torture as he sees fit, but since the risk of being prosecuted has essentially been taken off the table, the next president could just as easily reverse that. And, of course, Trump has promised to.

Michael Hayden, Bush’s CIA and NSA director, recently said that the military would refuse illegal orders from Trump. The problem is: why should we believe him? Besides being branded a serial liar by the Senate’s CIA torture report, Hayden is best known for carrying out orders from the Bush administration to circumvent the Fisa court and spy on Americans without warrants after 9/11 – orders later judged illegal.

Many Democrats abandoned their opposition to these dangerous policies once Obama took the oath of office in 2009. They would therefore be partially responsible for any havoc Trump wreaks if he were to become president.