Background: Joshua Lawrence Chamberlain (born Lawrence Joshua Chamberlain, September 8, 1828 - February 24, 1914) was an American college professor from the State of Maine, who volunteered during the American Civil War to join the Union Army. He became a highly respected and decorated Union officer, reaching the rank of brigadier general (and brevet major general). He is best known for his gallantry at the Battle of Gettysburg, for which he was awarded the Medal of Honor. Chamberlain was commissioned a lieutenant colonel in the 20th Maine Volunteer Infantry Regiment in 1862 and fought at the Battle of Fredericksburg.
Context: Chamberlain became most famous for his achievements during the Battle of Gettysburg. On July 2, the second day of the battle, Union forces were recovering from initial setbacks and hastily regrouping into defensive positions on a line of hills south of the town. Sensing the momentary vulnerability of the Union forces, the Confederates began an attack against the Union left flank. Chamberlain's brigade, commanded by Col. Strong Vincent, was sent to defend Little Round Top by the army's Chief of Engineers, Brig. Gen. Gouverneur K. Warren. Chamberlain found himself and the 20th Maine at the far left end of the entire Union line. He quickly understood the strategic significance of the small hill, and the need for the 20th Maine to hold the Union left at all costs. The men from Maine waited until troops from the 15th Regiment Alabama Infantry, commanded by Col. William C. Oates, charged up the hill, attempting to flank the Union position. Time and time again the Confederates struck, until the 20th Maine was almost doubled back upon itself. With many casualties and ammunition running low, Col. Chamberlain recognized the dire circumstances and ordered his left wing (which was now looking southeast, compared to the rest of the regiment, which was facing west) to initiate a bayonet charge. From his report of the day: "At that crisis, I ordered the bayonet. The word was enough." While battlefield conditions make it unlikely that many men heard Chamberlain's order, most historians believe he initiated the charge.  The 20th Maine charged down the hill, with the left wing wheeling continually to make the charging line swing like a hinge, thus creating a simultaneous frontal assault and flanking maneuver, capturing 101 of the Confederate soldiers and successfully saving the flank. This version of the battle was popularized by the book The Killer Angels and the movie Gettysburg, but there is debate on the historical validity of this account. Chamberlain sustained two slight wounds in the battle, one when a shot hit his sword scabbard and bruised his thigh, and another when his right foot was hit by a spent bullet or piece of shrapnel. Chamberlain also personally took a Confederate prisoner with his saber during the charge. After initiating the maneuver, he came upon a Confederate Officer wielding a revolver who quickly fired, narrowly missing his face. Chamberlain remained steadfast, and with his sword at the officer's throat accepted the man's arms and surrender. The pistol Chamberlain captured at Gettysburg can still be seen on display in the Civil War exhibit of the Maine State Museum. For his tenacity at defending Little Round Top, he was known by the sobriquet Lion of the Round Top. Prior to the battle, Chamberlain was quite ill, developing malaria and dysentery. Later, due to this illness, he was taken off active duty until he recovered.  For his "daring heroism and great tenacity in holding his position on the Little Round Top against repeated assaults, and carrying the advance position on the Great Round Top", Chamberlain was awarded the Medal of Honor.
Question: What was Chamberlain's rank?

Answer:
Col. Chamberlain