Politics has always, to some extent, been the art of combining doing what’s right with doing what’s in one’s own political interests. It would be naive to pretend otherwise. But in recent months – with a weak prime minister desperately trying to cling on to power, and senior Tories hungrily eyeing the top job – it feels like naked political ambition is shaping real-world outcomes more than ever before.

Nowhere is that more evident than in Sajid Javid’s decision to revoke Shamima Begum’s British citizenship. In trying to position himself as Theresa May’s successor, the home secretary is signalling to the tabloid press just how tough he is on national security and immigration. Perhaps, as a son of immigrants, he feels he has more to prove.

But make no mistake, signalling is all it is. Javid is setting this up as a fight between a strong home secretary and a mushy liberal left he can portray as willing to forgive supporters of Islamic State of any crimes.

Shamima Begum 'a bit shocked' that UK has revoked citizenship Read more

The extent to which Begum is responsible for crimes she may have committed is a thorny one. On the one hand, she is a vulnerable young woman who was groomed here in Britain as a child, married off to a man almost twice her age 10 days after arriving in Raqaa, and has lost two children in brutal conditions. On the other, as an adult she has expressed abhorrent views in the handful of media interviews she has given and has failed to unreservedly condemn a terrorist organisation that she has supported in full knowledge of the unspeakable atrocities and genocide it has committed.

I’m not sure we as observers have the knowledge or evidence to judge the extent to which she is a victim or a perpetrator. That’s for the courts. But it doesn’t matter. Even if Begum was the worst terrorist ever to have been born in Britain, Javid’s decision is wrong: both on national security grounds, and because it shuns Britain’s international obligations.

We don’t know the extent to which Begum is a security risk, or whether a few months in a deradicalisation programme would see her reject the ideology and crimes of Isis. That’s for our security services to determine. But she may be a risk to Britain and the rest of the world. We can’t leave her to roam free in Syria and potentially become even more of a poster child for anti-west ideology. Look at how well that turned out when Osama bin Laden was stripped of his Saudi citizenship in the mid 1990s: he went underground and became harder, not easier, to monitor. If she is brought back to Britain and deemed a security risk, she can at least be monitored around the clock. Don’t forget that terrorist attacks across Europe – including the Manchester Arena bombing – were committed by European nationals who travelled to Syria, then returned off their own back.

Profile Shamima Begum's journey into Isis Show Hide February 2015 At the age of 15, Shamima Begum flees her home in Bethnal Green, east London. She travels with schoolfriends Amira Abase and Kadiza Sultana. The three intend to meet another friend, Sharmeena Begum – no relation of Shamima – who had travelled to Syria in late 2014. CCTV footage shows the girls walking through Gatwick airport, where they boarded a flight to Turkey. There they are picked up by smugglers and taken across the border to an Isis base in northern Syria. Once there they move into a women’s house in Raqqa and apply to marry. July 2015 The families of the girls say that two of them have married Isis fighters, without disclosing which. They say they are distraught at the news. It later emerges that Begum had married 27-year-old Yago Riedijk, an Isis fighter from the Netherlands, 10 days after arriving in Raqqa. Soon afterwards she became pregnant with her first child, a daughter named Sarayah. July 2016 Abase marries an 18-year-old Australian jihadist, Abdullah Elmir. He was later reported by intelligence agencies to have been killed by a coalition airstrike. August 2016 Sultana’s family say that they believe she had been killed in an airstrike in Raqqa in May 2016. January 2017 Begum and her family flee Raqqa as Isis retreats and head south-east to the town of Mayadin. She has another child, a son called Jerah. Later, the family moves again as Isis is pushed back. June 2018 Begum sees her two surviving classmates, Sharmeena Begum and Abase, for the last time. Late 2018 Jerah dies, aged eight months, of malnutrition and an unknown illness. Her daughter dies soon after, aged one year and nine months. February 2019 Begum, who is heavily pregnant, gives an interview to the Times, in which she says that she should be allowed to return to the UK to raise her unborn third child. She gives birth a few days later. The Home Office tells her family that her citizenship will be revoked. March 2019 Jarrah, Begum's new born son, dies in a Syrian refugee camp. The child was three weeks old.

Photograph: POOL New/X80003

For Javid to strip Begum of her British citizenship because she may be entitled to Bangladeshi citizenship, on a technicality, through her parents, may or may not be legal. That will be determined in the courts. But what it says to the rest of the world is this: yes, Begum may have been born and radicalised in Britain, but we are washing our hands. She’s your problem now.

Why should Bangladesh, a country she may well have not even visited, be responsible for her? Or even worse, how is it right to lay responsibility for her safekeeping with the Syrian Defence Forces, who have more than enough on their plates? They have already implored European countries to take back the thousands of European nationals who travelled to Syria in support of Isis and ended up in their custody.

Shamima Begum: will the plan to revoke her citizenship succeed? Read more

One of the things that sets Britain apart from a terrorist organisation like Isis is that we are a liberal democracy and subscribe to the rule of law. We understand that we have not just legal, but moral, international obligations. What signal does it send, not just to Isis sympathisers but to other unsavoury regimes around the world, that Britain is prepared to dump its values when it suits a cabinet minister who has the premiership in sight? What does it say about us that we are prepared see an innocent baby who is a British citizen by descent suffer for the crimes his mother may have committed?

Whether or not Javid’s decision to revoke Begum’s citizenship is overturned – and he may well be expecting that – he wins politically. If his decision gets reversed he can blame it all on unelected judges, abrogating responsibility for the difficult decision he as home secretary should have taken.

It’s a depressing state of affairs. A Conservative party – that holds itself up as the party of law and order – weakening national security because it suits the political ambitions of one of its most senior MPs. Sajid Javid 1, liberal democracy 0. Shame on him for putting himself on the wrong side of the fight.

• Sonia Sodha is chief leader writer at the Observer