In a solemn tribute sprinkled with Scripture, words of assurance and resolve, President Obama told mourners at a memorial service for those who lost their lives in last week’s fertilizer-plant explosion in Texas that their loved ones will not be forgotten and promised to provide assistance to help rebuild and reclaim their community.

“We are here to say, ‘You are not alone, you are not forgotten,’” he told the tearful crowd gathered at Baylor University’s Ferrell Center in Waco. “We may not all live here in Texas, but we’re neighbors, too, and we’re Americans, too, and we stand with you and we do not forget.

“We will be there even after the cameras leave … your country will stand ever-ready to help you rebuild and reclaim your community,” he added.

The April 17 explosion left a crater more than 90 feet wide and damaged dozens of buildings and homes. The blast came minutes after a fire was reported at the West, Texas, fertilizer plant, operated by Adair Grain Inc.

Ten of the 14 people killed were first-responders who sped out toward the blaze while two others were civilians who tried to fight the fire. The 12 first-responders’ flag-draped coffins sat below a large screen that played a slideshow of victims set to country music, showing images of the men from their childhoods, their weddings and other moments of their lives with children and friends.

Then the screen showed video tributes from family members to each of the fallen, as relatives and friends tearfully remembered their loved ones and talked about each of the men’s values, love for their family, and predilections for things such as fried chicken, deer hunting and serving as an emergency first-responder.

Mr. Obama spoke during a break toward the end of the video, noting that the catastrophe happened the same week of the Boston Marathon bombings when the nation was consumed with the dramatic manhunt for the perpetrators and the story behind the latest act of terrorism on U.S. soil.

“The eyes of the world may have been fixed on places far away,” Mr. Obama said. “But our hearts have been here. Even amidst so much sorrow and so much pain, we recognize God’s abundance. We give thanks for the courage and compassion and incredible grace of the people of West.”

Just before those comments, Mr. Obama also quoted from a particularly appropriate verse from the Book of Psalms.

“Oh God, you have tested us, you have tried us — we went through fire and water — yet, you have brought us out to a place of abundance,” he said.

Even amid the ashes and devastation in the hours and days after the explosion, he said the modest town of West showed its “ability to stand tall in unimaginable adversity.”

He mentioned everyday heroes who emerged in the aftermath of the explosion — people who helped evacuate a nursing home, those who volunteered to shelter victims who had lost their homes and a pastor whose church burned down but still assembled the congregation outside on Sunday.

“‘What happened Wednesday is awful, [the pastor] told them, but God is bigger than all of this and he is here with you in West,’” Mr. Obama recalled.

Texas Gov. Rick Perry also eulogized the volunteer firefighters and first-responders whose courage led them to rush toward danger, not away from it.

“These are volunteers. Ordinary individuals blessed with extraordinary courage and determination to do what they could to save lives,” he said. “They’re the ones who proudly said, ‘not on my watch’ in the moments immediately following that explosion.”

Sen. John Cornyn, Texas Republican, introduced Mr. Obama, profusely thanking him and first lady Michelle Obama for their presence at the service.

“Today, we’ve been reminded, as Scripture says, there is no greater love than to lay down one’s life for a friend. Today, we honor the lives of 12 great men who gave their lives in an enduring act of love for their neighbors, families and community.”

Mr. Obama added his appearance at the memorial service onto a long-planned trip to Texas for Thursday’s opening of George W. Bush’s presidential library at Southern Methodist University in Dallas. On the flight from Dallas to Waco, the president’s helicopter passed over the site of the explosion in West.

The service attracted nearly 10,000, more than three times West’s population of 2,700.