Scott's army moved farther inland from Puebla unopposed and attacked Mexico City from the south. During that campaign in 1847, Hancock first encountered battle at Contreras and Churubusco. He was appointed a brevet first lieutenant for gallant and meritorious service in those actions. Hancock was wounded in the knee at Churubusco and developed a fever. Although he was well enough to join his regiment at Molino del Rey, fever kept Hancock from participating in the final breakthrough to Mexico City, something he would regret for the rest of his life. After the final victory, Hancock remained in Mexico with the 6th Infantry until the treaty of peace was signed in 1848.