the first battle , fought on july 21 , 1861 , was the initial major confrontation of the civil war , and a surprising confederate victory helped convince union officials that the war would be a prolonged effort .