Sumner Paine was brilliant, athletic, and fun-loving. After attending Boston Latin School he went to Harvard, where accusations of hazing — he and another student allegedly tried to screw a metal bar across a faculty member’s door — got him suspended late in his sophomore year.

He left Harvard in April 1863, joined the 20th Massachusetts Infantry Regiment, and became a second lieutenant and company commander in the so-called Harvard Regiment. Some men grumbled about the upstart kid from Boston, but in the end they couldn’t have asked for a more courageous leader.

The end came when Paine, only 18, died at the Battle of Gettysburg in the climactic Confederate assault on the Union center, known as Pickett’s Charge.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

As the Pennsylvania town and the nation mark the 150th anniversary of the pivotal battle this week, heroics such as Paine’s highlight the drama and horror of the war’s bloodiest struggle, and the prominent role played by New Englanders.

Sumner Paine’s story has long fascinated his great-great-nephew, Tom Paine, 65, a 1970 Harvard graduate and landscape architect. His Wellesley Hills study room features a posthumous portrait of the 6-foot-2-inch Sumner in uniform, a gloved hand clutching his belt buckle, his expression grim and determined.

“He was a fresh arrival faced with the challenge of trying to keep order among his company of older soldiers, to their displeasure,” said Paine, who is planning a trip to Gettysburg to see a reenactment of Pickett’s Charge at a site north of the town on Sunday. “But that moment passed, and in the end he put his life on the line leading his men.”

From one end of the line to the other, New Englanders from farms, city streets, and college campuses were well represented during the three-day battle ending July 3, 1863, which turned back the rebel incursion and dealt a demoralizing blow to General Robert E. Lee.

Among them, soldiers from Vermont’s 16th and 13th infantry regiments were sent to swing around and hit the flank of Pickett’s division during the failed Confederate attack.

Vermonter Howard Coffin’s book, “Nine Months to Gettysburg,” includes a letter from Captain Elmer Keyes of the 16th Vermont to his wife. It reads, in part: “A spent ball struck me, knocking me down, but I got right up again madder than ever. E.T. Davis of Felchville was killed. OH SUCH SCENES SUCH SCENES.”

The Fifth New Hampshire Infantry suffered 295 deaths in battle over the course of the war, more than any other regiment in the Union Army.

“They were in the thick of a lot of these major battles with Lee’s army, including Gettysburg,” said J. William Harris, a history professor at the University of New Hampshire. “Their colonel, Edward Cross, was killed at Gettysburg on the second day.”

The 20th Maine Infantry’s celebrated defense of a hill known as Little Round Top on the far left side of the Union line on the second day at Gettysburg came with an order to the regiment’s commander, Colonel Joshua Lawrence Chamberlain, “to hold this ground at all costs.” The Mainers were low on ammunition, but their bayonet charge got the job done.

Batteries of the First Rhode Island Light Artillery participated in a cannonade prior to Pickett’s Charge and helped foil the attack.

‘They were in the thick of a lot of these major battles with Lee’s army.’

“One of the most famous guns from Battery B is now in the Rhode Island State House,” said John Heiser, a historian at Gettysburg National Military Park. It still has a cannonball wedged in its muzzle.

Among Connecticut’s contributions, the 14th Infantry was at the center of the line on Cemetery Ridge July 2-3, and helped repulse Pickett. “Not a single Confederate got within 10 feet of the wall where they were,” Heiser said.

Tom Paine’s history of his great-great-uncle includes an album of Sumner’s personal correspondence, put together by the second lieutenant’s father.

Sumner’s last letter, scratched out in pencil for a college pal, was never sent. Dated June 30, 1863, the day before the battle began, it ended with, “I must stop now, as it is time for Inspection. Excuse this pencil but ink is played out here. Write.”

Sumner seemed surprised to be shouldered with so much responsibility with so little experience, but as usual he studied hard and welcomed the challenge.

“I have just been mustered in as 2nd Lieutenant commanding Co. G,” he wrote to his sister Fanny on May 7, 1863.

“You have found your element at last,” she wrote back. “Better than hazing professors, isn’t it?”

Other keepsakes include a tiny newspaper clipping, glued inside the album’s front cover, of Abraham Lincoln’s address at the dedication of the Gettysburg National Cemetery, and buttons and shoulder boards from the uniform Sumner wore when one of his ankles was apparently shattered by a shell fragment and a bullet struck him in the arm and chest.

In a letter to Sumner’s father, Captain Henry L. Abbott said he was told by a soldier who witnessed Sumner’s death that the second lieutenant “fell on his knee, then turned on his side, & supporting himself on one arm, he waved his sword over his head with the other, & cried out, ‘Forward’ to his men.”

Sumner, great-grandson of Robert Treat Paine, a Massachusetts signer of the Declaration of Independence, was, according to the school, the youngest Harvard student to die in military service during the war.

On May 9, 1904, the Harvard Corporation voted “that the name of Sumner Paine be entered in the Quinquennial Catalogue in the list of Bachelor of Arts of the Class of 1865.”