At the Battle of Fair Oaks (Seven Pines) the 40th New York gained considerable recognition for its action on June 1. The regiment's commander, Colonel Edward J. Riley, was kicked in the head and thrown by his horse prior to the battle, removing him from the front. Lt. Col. Thomas W. Egan led the regiment into battle on May 31, and on June 1 ordered a bayonet charge into the 5th and 8th Alabama regiments. The Mozart Regiment suffered 96 casualties, including every member of the color guard killed or wounded. Following the death of Color Sergeant Joseph Conroy, Color Corporal Robert Grieves, himself severely wounded, planted the flag far out in front of the regiment, before being ordered by Egan to withdraw.