understanding of letters sent by the prophet peace and blessings of Allah be upon him, to regional neighbours, inviting to Islam and pitch of war if offer not accepted, in both Islam and Judaism (for example like prophet Solomon and Queen of sahba). We can see similar trend below:
UNDERSTAND: In Islamic period after hijra and the treaty of haudaibiya, after when the Muslim communities came under so much hostility from nations. Especially from pegans, who also sought to kill the prophet peace and blessings of Allah be upon him.
Every prophet and his community/companions of believers from prophet Adam Alaihi Salam, through prophet Noah, Alaihi Salam, to Prophet Ibrahim Alaihi Salam, Prophet Musa Alaihi Salam, Prophet Isa-Jesus Alaihi Salam received death plans from the host communities of preaching, and even their own people, especially the idol worshippers or pegans.
They refused to allow the prophets and the believers to practice/worship in their land, casting them away, killing them, and chasing them with war.
It is even the same today with countries who don't rever God, -issuing government law against holy practice, I will not mention names.
So our prophet peace and blessings of Allah be upon him from Quran verses like chapter 9 verse 5,says after the holy months have passed, since they are after you in harmful ways, (the same people mentioned above), it says kill them, lie in wait for them in every place of ambush, take them as prisoners, beleguer them, but if they pray( All believers of God pray, Christians, zoros, Jews, Muslims, etc) pay the retribution tax, then leave their way free (see all below on letters sent with threat of war), Allah is most Forgiving, most mercifuful.
The prophet peace and blessings of Allah be upon him, sent various letters to Kings around Arabia and to some dynasties that have conquered regions and areas near Arabia (for example:Rome-under byzantine-Christian rule of King heraclius).
NO THREAT OF WAR. Because they were Christians not pegans attacking believers in monotheism.
The auxumite king of abyssinians-ethiopia (an najjasi) under Christian rule:
NO Threat of WAR IN THE Letter because of monotheistic practice.
To muqauqis, cyrus King of alexandra Egypt-under Greek /melchite patriarch of second byzantine period in Egypt. NO THREAT OF War. Because of monotheistic practice.
To alharith,5,, who ruled northwards, the levant, ash-sham in modern day Syria. The ghassanian-byzantine dynasty had already broken of hellenized Arabs. He ruled the byzantine Syria. Early pegan practice started feeding back during this breakage as they mixed Christian and idol beliefs-the Prophet peace and blessings be upon him asked him to be sincere in his belief of the oness of Allah. And if so, his kingship will remain his. WITH
Threat OF War Directed due to pegan practice.
To al-mundir-eastern Arabia of bahrayn of sassanian empire, after parthian weakness. They also had pegan beliefs
Two letters were sent, the first indicated that the Prophet peace and blessings upon him described that if he did not accept invitation to the oness of Allah, he should know that Islam will stretch and reach the ends of the camels toe. - (THREAT)
The second letter was in reply after the ruler and nobles accepted Islam, but asked what to do about Jewish and zoroastrian worshipers within the bahrayn territory. In which the prophet peace and blessings of Allah be upon him, replied ordering the now deposed ruler to give Muslims freedom to practice their religion, and that he has pardoned lot of offenders, as for the Jews and zoroastrian, they are free to practise their religion under his rule while they fulfil the retribution tax, jizya. So
No MORE TALK OF WAR.
To jayfar and ayyad, sons of julandi to the west in Oman - - this is your main interest. The letter was sent through a companion and messenger of the prophet peace be upon him called Amr bin Al-as RadiAllahu anhu. Oman region was also under sassanian beliefs so the letter contained THREAT of WAR.
Ayyad, The easier of the two brothers who said to him:" my brother is the ruler so I shall arrange a meeting with him". When it he read the letter ( i. e, jayfar), He said he has thought about it over and over. If he accepted a single person to take control over his territory, the Arabs would consider him weak. But when he saw the Amr bn al'as preparing to leave with the his declined action to the offer, he embraced Islam with his brother and many country men. This letter is celebrated in iman till this day. In their museum.
STILL NO COMPULSION IN ISLAM!
Only that to defend the community against those who threaten life, religious practice like all the prophets in history were fought/hated/threatened for their beliefs
ALLAH Subhanahu Wa Ta alaa, thus wages war against those who threaten war against the ones who practice monotheism. And thus Islam.
Rulers with armies were not allowed to keep their kingdom, around Arabia, as they always waged war against monotheistic beliefs. If they are captured, see the hadith, they practice their faith. It is only their army and threat to free monotheistic beliefs that you can see is ordered to be cut down near Arabia.
May we always be rightly guided.