Once a person realises that Allah is the pinnacle of justice, truth, peace, and success, the more wisdom they gain, the more they realise that their prayer, their sacrifice, their living, and their dying should all be for Allah.
There are righteous and just lies - which are acceptable as service to Allah whilst achieving a person applause for their wit, and there are unjust lies - which draw on the wrath of Allah and humiliate a person as unreliable, hypocritical, and despicable.
When Ibrahim :saws: claimed that the biggest idol had broken the smaller ones, he wsn't really lying to them or deceiving them in the sense that every person present knew that the biggest idol hadn't - but they were being asked to question their intellects.
When at the battle of the confederates, the Prophet :saws: was betrayed by the Quraydah who had broken the treaty without just cause where they had sworn a solemn lawful oath that: " Each must help the other against anyone who attacks the people of this document. They must seek mutual advice and consultation, and loyalty is a protection against treachery".
Mawsili:
“The first treaty which the Messenger of God concluded with the Jews of Medina took place when he concluded a truce with the Nadir, Qurayza, and Qaynuqa in Medina, stipulating that they refrain from supporting the pagans and help the Muslims. …”
and the Muslims were also under unjust siege and attack from Quraysh's mercenary coalition.
Ibn Ishaq:
“Then Nu’aym b. Mas’ud b. Amir b. Unayf b. Tha’alaba b. Qunfud b. Hilal b. Kalawa b. Ashja b. Rayth b. Ghatafan came to the apostle saying that he had become a Muslim though his own people did not know of it, and let him give what orders he would. The Prophet said: ‘You are only one man among us, so go and awake distrust among the enemy to draw them off from us if you can, for there is deceit in war. Thereupon, Nu’aym went off to B. Quryaza, with whom he had been a boon companion in His heathen days, and reminded them of his affection for them and of the special tie between them. When they acknowledged that they did not suspect him he said:
‘Quraysh and Ghatafan are not like you; the land is your land, your property, your wives, and your children are in it; you cannot leave it and go somewhere else. Now Quraysh and Ghatafan have come to fight Muhammad and his companions and you have aided against him, but their land, their property, and their wives are not here, so they are not like you. If they see an opportunity they will make the most of it; but if things go badly they will go back to their own land and leave you to face the man in your country and you will not be able to do so if you are left alone.
So do not fight along with these people until you take hostages from their chiefs who will remain in your hands as a security that they will fight Muhmmad with you until you make an end of him.’
The Jews said that this was excellent advice.
Then he went to Quraysh and said to Abu Sufyan b. Harb and his company: ‘You know my affection for you and that I have left Muhammad. Now I have heard something which I think it my duty to tell you of by way of warning, but regard it as confidential.’ When they said that they would, he continued,
‘Mark my words, the Jews have regretted their action in opposing Muhammad and have sent to tell him so, saying:
‘Would you like us to get hold of some chiefs of the two tribes of Quraysh and Ghatafan and hand them over to you so that you can cut their heads off? Then we can join you in exterminating the rest of them. He has sent word back to accept their offer;
so if the Jews send to you to demand hostages, don’t send them a single man.’
Then he went to Ghatafan and said: ‘You are my stock and my family, the dearest of men to me, and I do not think that you can suspect me.’ They agreed that he was above suspicion, and so he told them the same story as he had told Quraysh.
On the night of the Sabbath of Shawwal 5 A.H., it occurred by divine providence that Abu Sufyan and the chiefs of Ghatafan sent Ikrima b. Abu Jahl to B. Qurayza with some of their selected men saying that they had no permanent camp, that the horses and camels were dying; therefore they must make ready for battle and make an end of Muhammad once and for all. They replied that it was the Sabbath, a day on which ritually do no work, and it was well known what had happened to those of their people who had violated the Sabbath.
They added: ‘Moreover we will not fight Muhammad along with you until you give us hostages whom we can hold as security until we make an end of Muhammad; for we fear that if the battle goes against you and you suffer heavily you will withdraw at once to you country and leave us alone with the man in our country, and we cannot face him alone.’
When the messengers returned with their reply, the Quraysh and Ghatafan said that what Nu’aym told them was thus the truth.
Then they resolved: ‘Send to B. Qurayza that we will not give them a single man, and if they want to fight let them come out and fight.’
Having received this message from the Quraysh, B. Quryaza said: ‘What Nu’aym told you is the truth.
The people are bent on fighting and if they get an opportunity they will take advantage of it; but if they do not they will withdraw to their own country and leave us to face this man alone here. So send word to them that we will not fight Muhammad with them until they give us hostages as a security.’
But the Quraysh and the Ghatafan refused to do so, and God sowed distrust between them and sent very strong cold wind against them in those winter nights which upset their cooking-pots and overthrew their tents.....
https://discover-the-truth.com/2016/01/01/re-examining-banu-qurayzah-incident/
Remember when Yusuf :saws: kept his brother - he was however being just and had told his brother the truth beforehand - and not so that he could harm him - unlike the time when they threw him in the well and lied to ya'qub :saws: ...
And when Musa :saws: told the magicians:
Forge not a falsehood against Allaah
I'm sure that a mind endued with wisdom and justice can see the difference between islah and fasaad.
Read this too:
https://archive.org/download/TheBio...phy of the Prophet and the Orientalists 1.pdf
https://archive.org/download/TheBio...phy of the Prophet and the Orientalists 2.pdf