HAMPSTEAD, N.H. (AP) – An Army Ranger killed in Iraq was remembered as smart, determined and selfless at his funeral Wednesday.

Capt. Jonathan Grassbaugh, 25, was killed by a roadside bomb while on patrol in Zagabiyah on April 7. He was on his second tour in Iraq.

Brig. Gen. Michael Ferriter, a top adviser to the U.S. military commander in Iraq, got to know Grassbaugh during his first tour, after the junior officer was selected to serve as Ferriter’s aide-de-camp.

“Jonathan was perfect,” he said during the funeral. “He was always the first to know instinctively the best way to accomplish any mission.”

“He made me a better leader and a better person,” Ferriter said during the funeral Mass at St. Anne’s Catholic Church.

Grassbaugh graduated from Hampstead Middle School, where his mother, Patricia, is the principal, and Phillips Exeter Academy. He then went on to Johns Hopkins University, where he earned a degree in computer science and joined the Reserve Officer Training Corps.

He met his wife, Jenna, in the ROTC when he was a senior and she was a freshman. They married 10 months ago on Cape Cod, shortly before he was deployed to Iraq for the second time, and stayed in touch daily by computer. Jenna Grassbaugh is a first-year law student at William & Mary.

“I’m so sorry I never got to say goodbye, and I hope you know how much I wish I could have spoken to you one last time,” she said, calling her dead husband “far more selfless and thoughtful than I am.”

“How to continue on with my life is a question I have asked myself about 100 times over the past week,” she said. But in death, she said she wants to be laid beside her husband at Arlington National Cemetery.

Grassbaugh was inspired by his mother to excel academically, and inspired to follow in the footsteps of his father, Mark Grassbaugh, also a Ranger, friends and family members said.

Grassbaugh’s older brother Jason, an Army captain and doctor, said Jonathan was competitive and determined to the point of stubbornness.

“Once he knew what he wanted, my brother always got it,” he said. “Jon had a whole string of plans for what he and Jenna would accomplish together.”

Grassbaugh was enthusiastic about everything he did, from working at his high school radio station, WPEA, to re-enacting Civil War battles. His brother remembered a night Jonathan invited the family to the Grainger Observatory at Phillips Exeter Academy, to see a full moon and the rings around Jupiter.

“It was typical of Jon to notice the beautiful things around him and then share them,” his brother said.

More than 500 people attended the funeral, including Gov. John Lynch and the town’s police and firefighters.

“Jonathan was also committed to serving people, whether they were displaced by Hurricane Katrina or displaced by the war in Iraq,” Lynch said in brief remarks. “It was this commitment to people and his ability to lead that brought him to Iraq a second time.”

A dozen Patriot Guard Riders, a group of veterans on motorcycles, accompanied the hearse after it left the church, and other veterans lined the parking lot, holding flags. The New Hampshire National Guard provided an honor guard and other Rangers from Grassbaugh’s unit in the 82nd Airborne Division served as pallbearers.

AP-ES-04-18-07 1810EDT