At the same time the division was assigned from Sumner's II Corps to Maj. Gen. John C. Frémont's "Mountain Department" and joined his forces on May 11, taking part in the engagement near Strasburg. In the Battle of Cross Keys the brigade, still under now Brig. Gen. Stahel, and the 39th New York were stationed on the far left. It made an attack against the Confederate lines of Gen. Isaac R. Trimble, but was repulsed with heavy losses. Its further retreat marked the defeat of the Union Army on this day. On June 26 the 39th New York was assigned to Brig. Gen. Julius White's "Railroad" Brigade in the VIII Corps of the Washington defences. The brigade consisted of the 39th, 111th and 115th New York Infantry regiments, as well as the 15th Indiana Battery. During July and August it encamped at Middletown, Virginia; and D'Utassy, now free from the ethnical struggles with his commanders, managed to get the appreciation and admiration of his fellow American officers. The brigade took part in the retreat to Harper's Ferry in September 1862. General White officially accepted to serve under command of Colonel Dixon S. Miles, and took position as commander of the line at Bolivar Heights. This put D'Utassy in command of the brigade. D'Utassy took part in the surrender on September 15, though he reportedly strongly advised against it.