WASHINGTON (CNN) -- Sens. John McCain and Barack Obama took their campaigns back to Washington on Saturday in an effort to reach out to Latinos.
Both McCain and Obama spoke at the annual conference of NALEO, the National Association of Latino Elected and Appointed Officials, at the Renaissance Hotel near the White House.
Much of McCain's speech focused on the issues he has been pushing throughout the week: energy solutions and the lagging economy.
Obama, speaking after McCain, touched on the importance of the Latino voting bloc.
"This election could well come down to how many Latinos turn out to vote. And I'm proud that my campaign is working hard to register more Latinos and bring them into the political process.
"Because I truly believe that if we work together and fight together and stand together this fall, then you and I together will change the political map from top to bottom," Obama said.
McCain's speech was disrupted several times by hecklers from the anti-war group Code Pink.
According to the group, Phoenix resident Liz Hourican, holding a camera aimed at the candidate, stood up when McCain said "I represent Arizona ..." Watch McCain get heckled »
"John, you do represent Arizona! And we want a peace candidate!" she yelled. "We want a peace candidate! Peace takes courage!"
As the still-shouting woman was escorted from the hall, McCain, laughed off the disruption and joked, "That's a long trip out."
"I'm sure you've seen the polls out now about trust and confidence in our government, and the one thing the American people want us to stop doing is yelling at each other," he said.
Five minutes later, two more women jumped up.
"Your silence is consent to war crimes! War criminal!" one yelled. Another woman carried a pink banner that read "McCain=Guerra," or "McCain=War."
McCain, however, was met with a standing ovation by the audience at the end.
At the beginning, he issued a strong challenge to Obama, scheduled to speak after him, over his call for Obama to join him in a town hall meeting.
"I wish my colleague were here from the U.S. Senate, but he is not here. I would have appreciated it more if we could have had a town hall meeting."
McCain also paid his respects to "the contributions of Hispanic-Americans to the culture, economy and security of the country I have served all my adult life."
"And I know this country, which I love more than almost anything, would be the poorer were we deprived of the patriotism, industry and decency of those millions of Americans whose families came here from Mexico, Central and South America," McCain said
He said he believes that immigration reform begins with securing the United States border with Mexico. He touched on his own failed attempt at an immigration bill. Watch as both McCain and Obama woo Latinos »
"I and many other colleagues twice attempted to pass comprehensive immigration legislation to fix our broken borders. ... We must prove to [Americans] that we can and will secure our borders first, while respecting the dignity and rights of citizens and legal residents of the United States," he said.
McCain co-sponsored Bush-backed immigration legislation that would have increased funding and border security technology, tightened enforcement of existing laws and provided a legal path to citizenship for some illegal immigrants. He also voted to authorize construction of a 700-mile fence along the U.S.-Mexican border.
Obama also supported the Bush-backed immigration legislation and voted to approve construction of the U.S.-Mexican border fence.
The Illinois Democrat also offered his position on immigration. He said reform will depend on securing the borders and punishing employers who exploit immigrant labor.
"[It's] reform that finally brings the 12 million people who are here illegally out of the shadows by requiring them to take steps to become legal citizens putting them on a pathway to citizenship," he added. "I will say it now, and I will say it after I'm president."
Earlier in the day, Obama made a private stop at Walter Reed Army Medical Center, where he presumably visited with wounded veterans, though campaign aides would not confirm it.
While the Illinois senator was inside, Obama's campaign announced that he would be making trips to both the Middle East and to Europe this summer.
McCain, meanwhile, met with Iraqi president Jalal Talabani and Gloria Arroyo, president of the Phillipines, in Washington.
On Sunday, McCain will meet privately with evangelist Franklin Graham in Asheville, North Carolina.
CNN's Peter Hamby and Chris Welch contributed to this report.