A Long Island soldier was killed in Afghanistan over the weekend, becoming only the second East Ender to die in combat since 9/11.

Joseph Theinert, 24, a lieutenant in the 71st Cavalry Regiment for the U.S. Army, was killed in a truck bombing in Kandahar, Afghanistan. It was Theinert’s first tour of duty overseas.

Flags flew at half-mast on Shelter Island yesterday to pay tribute to the fallen hero. His friends and family mourned the former cross-country running star, basketball player and lacrosse player.

“He was like the perfect all American kid,” said Jimmy Rando, a close friend. “He lived and died for what he believed in.”

Theinert — whose step-father Frank Kestler is in the Army Reserves and also served in Afghanistan — had been stationed in Kandahar for just over a month.

“We have no informants right now, we’re still working on it,” he recently told a reporter about how his regiment received information about potential bombs in its way. “They’ll eventually come around. They don’t trust you when you first arrive.”

Sag Harbor resident Lance Corporal Jordan Haerter, 19, a rifleman in the Marine Corps, was killed in action in Ramadi, Iraq in 2008.