ANAHEIM -- Justin J. Swanson talked about duty and discipline and about being a role model for his family when he signed up for the U.S. Marine Corps a few weeks out of high school.

Lance Cpl. Swanson of Anaheim died earlier this week in the blast of an improvised explosive as he participated in combat operations in southern Afghanistan. He was 21 years old.

"I'm in the United States Marine Corps. Ooorah!!!" he wrote on his MySpace page. "I love what I do ... and I'm good at what I do. ... I like being number 1 and being the best at whatever it is I do."

Swanson was serving in the Taliban stronghold of Helmand Province when he died of his injuries from an improvised explosive device, the Department of Defense announced on Thursday. His death on Tuesday came on the official birthday of the U.S. Marine Corps, and a day before Veterans' Day.

His family could not be reached for comment.

Swanson enlisted in the Marines in 2006 and was based at Camp Pendleton with the 1st Battalion, 5th Marine Regiment, 1st Marine Division, I Marine Expeditionary Force. Officials at the base said he was on his second deployment after returning from Iraq last year.

A close friend, Daniel Ramos, 21, of Fullerton, said Swanson volunteered to go to Afghanistan. "He didn't want to stay back," Ramos said. "He was ready to go."

Swanson grew up in a neighborhood in Anaheim where role models were in short supply. He had talked since high school about joining the Marines, in part to set an example for his two younger brothers and two younger sisters, Ramos said.

He went to Buena Park High School, where – according to his MySpace page – he majored in football. He was a laid-back student, and his teachers sometimes thought they were more worried about his future than he was.

But many of them said he was something special. Michelle Johnson, who taught him freshman English, called him a "diamond in the rough, full of enthusiasm." And school counselor Cindy Chow remembered a student workshop, when a small boy came forward to say he was being picked on.

It was Justin Swanson, the big football player, who "made it a point to say, I have your back," Chow said.

Swanson visited the school a few months ago, and spoke to students in English teacher Ron Carcich's classroom about finding their way in life. Carcich remembered Swanson not as the well-disciplined Marine standing at the front of the classroom, but as the student who never seemed to take anything seriously.