where he was responsible for constructing the President Street Station, the line's southern terminal in east downtown waterfront Baltimore in 1849–1850, now the oldest big city train depot left in America. Later then Trimble went to the Philadelphia and Baltimore Central Railroad. From 1859 to 1861, he was superintendent of the Baltimore and Potomac Railroad. Following the firing on the Federal installation of Fort Sumter in Charleston harbor in South Carolina in early April 1861, he led a contingent of Maryland state militia to burn the railroad bridges around Baltimore to prevent the entry of any more Federal regular army or Northern state militia from passing through the divided riotous city following the bloodshed conflict of the Pratt Street Riots on April 19, 1861, on the orders of the Mayor of Baltimore George William Brown and Governor of Maryland Hicks. Civil War At the start of the Civil War, Trimble participated in efforts to restrict the movement of Union troops to Washington, D.C., by burning bridges north of Baltimore. When he realized that Maryland would not secede from the Union, he returned to Virginia and joined the Provisional Army of the state of Virginia as a colonel of engineers in May 1861. He was appointed a brigadier general in the Confederate States Army on August 9, 1861, and was assigned to construct artillery batteries along the Potomac River and later the defenses of Norfolk, Virginia. He was given command in the Army of the Potomac (the predecessor of the Army of Northern Virginia), of a brigade that consisted of regiments from four different states, effectively merging them into a single fighting unit. Trimble first saw combat as part of Thomas J. "Stonewall" Jackson's spring 1862 campaign in the Shenandoah Valley. He distinguished himself in the Battle of Cross Keys by fighting off an attack from Union troops under Maj. Gen. John C. Frémont, and then seizing the initiative to counterattack and rout them. During the Seven Days Battles under Jackson outside of Richmond, Virginia, his brigade had few engagements, but they fought hard at Gaines' Mill and he sought to follow up the unsuccessful Confederate assault on Malvern Hill by making a night attack, but his request was refused. In the Northern Virginia Campaign, Trimble's brigade performed well at the Battle of Cedar Mountain and defeated a Union brigade at Freeman's Ford in mid-August. The brigade marched with Jackson around