President Obama delivered a message of hope Monday to Ireland, an old friend down on its famous luck, telling an audience that filled a broad downtown avenue here that “your best days are still ahead.”

“Our greatest triumphs — in America and Ireland alike — are still to come,” Obama told the crowd of students, celebrities and families, echoing a message he has delivered to his own domestic constituency during months of recession.

The visit to a blustery Dublin, where empty storefronts and half-finished buildings stand testament to its dire financial condition, served as a mostly ceremonial start to Obama’s six-day swing through Europe.

The four-nation tour is heavy with official meetings at a time when national security issues — in Afghanistan, North Africa and the Middle East — stand at the top of the U.S.-European agenda.

But Obama used his stop here to practice some uplifting public diplomacy, emphasizing shared American and Irish heritage and traits, including, most recently, resiliency in the face of economic crisis.

He walked out onto some branches of his family tree and had a pint of Guinness in Moneygall, the birthplace of his maternal great-great-great grandfather. He then arrived for a street rally in downtown Dublin where some U.S. presidents addressed Ireland during moments of despair.

“I’ve come home to find the apostrophe we lost somewhere along the way,” he told the audience, making reference to the preferred Irish spelling of his name, O’Bama.

At each stop, the crowd seemed to view his visit as another hopeful sign that, after several years of debilitating recession, change may be near.

Obama’s arrival followed the historic visit last week by Queen Elizabeth II, who became the first British monarch to come to the Republic of Ireland since it became independent in 1922.

“This on the heels of that — just brilliant,” said Declan Dunphy, who with his wife, Francis, brought their two young daughters to hear the president.

Dunphy shuttered his beer-delivery business two years ago, laying off his dozen employees. Now he drives a cab and, like others, said he hoped the president’s visit would translate into some tangible change.

“It will bring a lot of tourism, hopefully,” Dunphy said. “It will open a lot of people’s eyes in America to us again.”

The president and first lady Michelle Obama emerged early Monday from Air Force One onto a wind-swept tarmac. They then hopped aboard helicopters for a short flight to a ceremonial welcome from President Mary McAleese, who apologized for the stormy weather.

But Iceland’s erupting volcano is posing a bigger problem than the rain, complicating Obama’s travel plans as it did twice last year. The president left Dublin and headed to London on Monday night — rather than Tuesday morning — to avoid potential delays.

With McAleese, Obama planted an Irish oak in Phoenix Park, near a sequoia that President John F. Kennedy planted in 1963.

He then visited Prime Minister Enda Kenny — the taoiseach, in Irish parlance — at Farmleigh, a 78-acre estate on Dublin’s outskirts once owned by the Guinness family.

In brief remarks, Obama told Kenny that Ireland “punches above its weight” on the world stage, because of its contributions to peacekeeping missions, commitment to human rights and work on food security. The two countries are bound, he said, by “blood links” resulting from more than a century and a half of immigration.

News channels carried the Obamas’ arrival and early appearances live. Souvenirs of the president’s one-day visit are on sale in the city and in Moneygall, population 300, whose residents turned out in heavy rain for a chance to see him.

Irish and American flags hung from simple, freshly painted houses and the stone facades of businesses along the main street, as crowds several layers deep jostled for a handshake.

Obama shook many of them until rain drove him and the first lady inside his ancestral home.

“I’m so nervous I can’t talk,” said John Donovan, a shopkeeper, funeral director and farmer who now owns the house.

More than 160 years ago, Falmouth Kearney, Obama’s maternal great-great-great grandfather, left the village at age 18 for the United States. Famine was killing the countryside.

Many in Moneygall hoped Obama’s visit would help revive a badly stumbling economy.

“It’s going to put Ireland on the map,” said Mairead Kerwin, a social-care worker. “Ireland has been known for a lot of the wrong reasons. This will make us the place to be.”

The first couple made their way to Ollie Hayes bar, a low-ceilinged tavern decorated with stained glass. Framed on one wall hung a T-shirt reading, “O’Bama’s Irish Pub.” Posters from his 2008 campaign decorated others.

Obama chatted with patrons and fussed over his Guinness, waiting for it to settle in the glass so, in his words, it would be “perfect.” The first lady had one, too.

“You look a little like my grandfather,”the president told one man. He also met Henry Healy, whom he identified as his “eighth cousin.”

From Moneygall, Obama traveled to the center of Dublin, speaking on a stage set amid the columns of the original Irish Parliament, where President Bill Clinton addressed a rapturous audience in 1995.

“I think we all realize that both of our nations have faced great trials in recent years, including recessions so severe that many of our people are still trying to fight their way out,” Obama said. “Those of us who are parents wonder what it will mean for our children and young people, like so many who are here today.”

“Ireland,” he said, “as trying as these times are, I know our future is still as big and as bright as our children expect it to be.”

The event effectively shut down the city center, but the ebullient crowd, which city officials estimated to be 25,000 people, didn’t mind the disruption.

Speakers blared Irish rock and roll — Sinead O’Connor, U2, the Boomtown Rats, Van Morrison and a range of live bands — as thousands gathered throughout the chilly afternoon in the shadow of centuries-old Trinity College. A collection of Irish musicians and movie stars gathered to greet Obama.

“He’s cool, that’s all,” said Tom Kane, 47, a manager at Intel here.

Like many of those who filled the street around him, Kane arrived with his son, David, hours before Obama was scheduled to speak.

As the crowd clapped and swayed around him, Kane recalled Clinton’s visit, which came during a perilous moment in Northern Ireland peace-making.

“Bill Clinton coming here during ‘The Troubles’ gave us a huge lift,” he said. “We see Obama today as a continuation of that, for the economy.”

Kane said he hoped the visit would serve as a tacit endorsement of Ireland for American investors, who like others have avoided the country in recent years.

“People are just so negative about the economy, so it’s great to have someone here to lift our spirits up,” said David Kane, 17, a high school senior. “Look around. Everyone’s smiling.”