On the formation of the
Batavian Republic in 1795, Van Merlen transferred to the army of the new nation. He also moved from the infantry to the cavalry, though this necessitated a drop in rank, becoming a 1st Lieutenant in the Batavian
Hussars on 10 July 1795. On 4 April 1798 he was promoted to
Ritmeester, a rank equivalent to captain. The following year, his regiment helped defeat the
Anglo-Russian invasion of Holland, with Van Merlen fighting at
Bergen,
Alkmaar and
Castricum. In 1800 he was campaigning along the
Main, distinguishing himself at the battle of Oberschwach and the siege of
Würzburg. When the Batavian Republic became the
Kingdom of Holland in 1806, Van Merlen found favour with
King Louis and was made a Lieutenant Colonel in the Royal Guard Hussars on 23 October 1806. Three days later he was marching with the Dutch army into Germany to support French forces in the
war with Prussia. He saw service near Ertzen on 7 November 1806 and drove the Prussian vanguard into
Hamelin. However, a dispute arose between Louis and his brother
Napoleon which resulted in the Royal Guard being returned to
The Hague without seeing further action. ==French empire==