The men of the newly reorganized 157th Pennsylvania were then transported to Washington, D.C., attached to Tyler's Division, 22nd Corps in February 1863, and assigned to defensive duties of the city. On May 29, 1864, the battalion was reassigned to the 2nd Brigade, 4th Division, 5th Army Corps of the Army of the Potomac, and ordered out on operations between North Anna and Cold Harbor, Virginia. Engaged in the battles of Bethesda Church (June 1–3) and Cold Harbor (June 1–12), the 157th Pennsylvania then participated in the Siege of Petersburg, including the Battle of the Crater (July 30). Attached to the 3rd Brigade, 2nd Division, 5th Army Corps beginning in August 1864, the 157th Pennsylvanians were then assigned to operations along the Weldon Railroad (August 18–21) before engaging in the fighting at Poplar Springs Church (September 30–October 2), Yellow House (October 2), and Boydton Plank Road (October 27–28), and in Warren's Raid on the Weldon Railroad (December 7–12).