In 1908, he became Governor of Latakia, a city on the Syrian coast. He took no part in the Ottoman-Arab conflict during the years 1916–1918, but returned to live in Damascus when the Ottoman Empire was defeated in October 1918. In the four-day interlude between the departure of the Turks and the arrival of the Arab army, he created a preliminary government with a group of Syrian notables in Damascus, headed by Prince Said al-Jazairi, an Algerian notable who was living in Damascus. In July 1920, Prime MinisterAla al-Din Droubi appointed him Minister of the interior. This was during the rule of King Feisal I of Syria. Ayyubi held office in the wake of the French occupation of Syria. He established links with local nationalists and smuggled arms and funds to Saleh al-Ali, leader of the revolt in the Syrian coast, and Ibrahim Hananu, leader of the "Aleppo Revolt". In Latakia, he turned a blind eye to the activities of Omar al-Bitar, refusing, in his capacity as Minister of the Interior, to arrest the rebels, and facilitating their ambushes on French garrisons. He was also minister during the famous Battle of Maysalun where the Syrian army was defeated by the French army of General Henri Gouraud. Ayyubi's colleague General Yusuf al-Azmah, the Minister of War, was killed in combat. In August 1920, a group of armed men tried to kill Ayyubi in the province of Hawran in southern Syria. They accused him of treason for accepting office under the "French Mandate". The assassination attempt, however, failed at convincing him to step down, and he remained at his post until 1922, after which he became Minister of Justice in the pro-French cabinet of Prime Minister Subhi Barakat, keeping his post until a national uprising took place against the French Mandate in 1925. In 1928, Ayyubi allied himself with the "National Bloc", the leading anti-French movement in Syria, but did not become an official member. The Bloc called for the liberation of Syria through diplomatic means rather than armed resistance. Meanwhile, Ayyubi remained on cordial relations with French authorities. During the 1930s, he served as an intermediary between both sides. In March 1934, he became Minister of Justice in the pro-French cabinet of Prime Minister Taj al-Din al-Hasani. Relations between the Bloc and the French deteriorated sharply in 1936, and Bloc leaders called on the nation to go on strike. The strike crippled commercial life, while hundreds of Syrians were arrested or beaten by the French Army. The ordeal, which lasted for sixty days, embarrassed France before the international community. Fearing that the 60-day strike would spread to French colonies in North Africa, the French government promised to address Syrian grievances, and invited a senior Bloc delegation for independence talks in Paris, France. While the Bloc discussed Syria’s future, the pro-French cabinet of Prime Minister Taj al-Din al-Hasani was dissolved, and the French High Commissioner, Comte Henri de Martel, asked Ayyubi to form an independent transition government to supervise state affairs. The new prime minister managed to form a coalition cabinet that included elements from the National Bloc and the pro-French movement. When the Bloc returned from France in September 1936, Ayyubi resigned from office, having served for 10-months as prime minister. With the Bloc President Hashim al-Atasi, Ayyubi declared an end to the 60-day strike and announced the Bloc's victory in reaching an agreement with France that guaranteed independence for Syria over a 25-year period. This agreemend was ratified by the Syrians but later refused by the French, who feared losing an important colony in the Arab world if World War II broke out in Europe. In March 1943, during World War II, the French General Charles de Gaulle led an Allied offensive into Syria to defeat the Vichy forces stationed in Damascus. Ayyubi became prime minister for another transition period and also appointed himself Minister of Foreign Affairs, Defense and Interior. He supervised presidential elections and left office in August 1943 when President Shukri al-Quwatli came to power. He resigned from political life but was honored by the National Bloc when independence was achieved in April 1946. He was hailed as a moderate and a dedicated nationalist. He is most remembered in Damascus today because of his great palace in the Afif neighborhood and a street named in his honor.