In 1636, the Cardinal-Infante Ferdinand organised a joint Spanish-Imperialist army for a major invasion of France from the Spanish Netherlands, and Thomas was initially in charge, defeating the French army commanded by Soisons, at the Somme, though Ferdinand soon took over supreme command. The invasion was initially very successful, and seemed capable of reaching Paris, where there was a great panic; if Ferdinand and Thomas had pushed on, they might have ended the war at this point, but they both felt that continuing to Paris was too risky, so they stopped the advance. Later in the campaign, Thomas had problems with the Imperialist general Ottavio Piccolomini, who refused to accept orders from the Prince as a Spanish commander, arguing that his Imperialist troops were an independent force. Military action for Thomas is not recorded in 1637, but in this year, when his brother-in-law Soissons fled from France after his failed conspiracy against Cardinal Richelieu, he acted as intermediary between Soissons and the Spanish in negotiations which led to a formal alliance between the count and Philip IV of Spain concluded 28 June 1637 - although within a month Soissons had reconciled with France! In 1638, Thomas served in Spanish Flanders, helping to defend the fortress-city of Saint-Omer against a French siege; in mid-June, he managed to get reinforcements into the place, then with the rest of his small army entrenched about 15 km. to the north-west at Ruminghem, opposite the French army under Jacques-Nompar de Caumont, duke of La Force at Zouafques; after being joined by Imperialist reinforcements under Ottavio Piccolomini, he marched to attack La Force, and was defeated with the loss of 2,000 men killed or captured (action at Zouafques, exact date unknown but around 21 June). However, he then marched back with his remaining troops to the continuing French siege of Saint-Omer, where he put in more reinforcements and then entrenched himself so securely in the vicinity that the French found it impossible to continue the siege and gave up. Thomas and Piccolimini subsequently stuck so close to La Force that the French were unable to undertake any serious operations.