President Obama and Mitt Romney commemorated Memorial Day on opposite coasts Monday, each trying to lay claim to a constituency — service members, veterans and their families — that has emerged as a battleground in the campaign.

Obama paid his respects to fallen soldiers at three events on Monday: a White House breakfast for families who have lost loved ones, a wreath-laying ceremony at Arlington National Cemetery and a speech to thousands gathered at the Vietnam Veterans Memorial.

Romney, the presumptive Republican presidential candidate, joined Sen. John McCain (R-Ariz.), a decorated Vietnam veteran, to lay wreaths at a morning commemoration in San Diego that drew a crowd of 5,000.

Although neither candidate’s schedule was labeled political, both managed to weave themes from their campaigns into their remarks, highlighting the importance of a voting group that Republicans have historically dominated. That advantage remains intact, according to a recent Gallup poll that gives Romney a commanding lead among veterans.

But that hasn’t stopped Obama from launching an aggressive effort to court veterans and their families, in which he has touted the killing of Osama bin Laden, the end of the war in Iraq and the effort to wind down combat operations in Afghanistan.

Obama has also emphasized how he has increased funds for the Department of Veterans Affairs, implemented the post-Sept. 11 G.I. Bill and launched job programs for returning troops.

On Monday, Obama’s speeches honoring the nation’s war dead touched on those actions and praised veterans for their contributions. At Arlington cemetery’s Tomb of the Unknowns, amid solemn performances of the national anthem and “Taps,” the president recognized both the first and the final casualties of the war in Iraq, alluding to his own stewardship of a conflict that he had promised in 2008 to end. He also pledged Monday to go to war only with a “clear mission,” with the support of the nation and when “absolutely necessary.”

At the Vietnam memorial ceremony, which actor Tom Selleck presided over as master of ceremonies, Obama delivered a lengthy speech in which he addressed some of that war’s most painful legacies. He described the treatment of returning Vietnam veterans as a “national shame, a disgrace that should have never happened.”

He promised to do “everything in our power” to continue the effort to find those still missing in action and to provide the necessary benefits to disabled veterans, those afflicted by the effects of Agent Orange and post-traumatic stress syndrome, and those struggling to find jobs.

He celebrated the valor of Vietnam veterans and credited them for the nation’s appreciation of those who have served in more recent conflicts.

“Because of you, because our Vietnam veterans led the charge, the Post-9/11 G.I. Bill is helping hundreds of thousands of today’s veterans go to college and pursue their dreams,” Obama said. “Because of you, because you didn’t let us forget, at our airports, our returning troops get off the airplane and you are there to shake their hands. Because of you, across America, communities have welcomed home our forces from Iraq. And when our troops return from Afghanistan, America will give this entire 9/11 generation the welcome home they deserve. That happened in part because of you.”

If the polls don’t show Obama making inroads among veterans, his efforts to court this constituency at the very least are pushing Romney to pay attention to a voting group that Republicans historically have been able to count on for support.

In San Diego, Romney did not appear to be taking veterans’ backing for granted, however. He spoke about visiting Afghanistan and Iraq while he was governor of Massachusetts and about talking to not only soldiers, but also their families at home.

Romney, who regularly criticizes Obama for undermining global security with a weak foreign policy, did not mention the president by name. But he ticked off a list of global threats and said: “I wish I could tell you that the world is a safe place today.”

Romney said the country must not shrink its military to the point where the United States loses its status as the strongest power in the world.

“Were we to follow that kind of course, there would be no one that could stand to protect us,” he said.

Under clear San Diego skies, the crowd waved flags, sang along to patriotic hymns and cheered as veterans were recognized.

Typically the annual event draws about 100 people, according to organizers, but two hours before the ceremony began, large crowds began arriving.

The president’s visit to the Vietnam memorial was timed to mark the start of the 50th anniversary of that conflict. But if 2008 is a guide, it will be harder for Obama to connect with older veterans than those coming home from more recent conflicts.

Obama won veterans under age 60 in 2008, a better result than Sen. John F. Kerry, a decorated Vietnam veteran, had achieved four years earlier. But Obama lost veterans overall because of a lack of support among the older men, who overwhelmingly outnumber their younger counterparts because so many more Americans served in Korea and Vietnam than in more recent conflicts.

Obamas and his wife, Michelle, attended the events at Arlington and the Vietnam memorial on a sweltering Washington day that saw temperatures exceed 92 degrees. Spectators fanned themselves with programs while military honor guards performed 21-gun salutes. At the Vietnam memorial, several Vietnam-era aircraft flew overhead at the close of ceremonies, including Huey and Chinook helicopter and a B-52 bomber.

Obama was the third sitting president to visit the Vietnam Veterans Memorial, after Ronald Reagan and Bill Clinton.

Gardner reported from Washington. Henderson reported from San Diego.