(CNN) -- Barack Obama's historic train ride to Washington on Saturday drew large, cheering crowds of people who braved freezing weather and gathered along the tracks in cities and small towns along the way in hopeful anticipation of getting a glimpse of the nation's next president.

The crowd cheers as President-elect Barack Obama takes the stage in Baltimore, Maryland. more photos »

In Baltimore, Maryland, alone, about 40,000 people stood shoulder-to-shoulder in the cold to greet Obama as he stopped on his way to his Tuesday inauguration.

His welcome was raucous and animated, as the sea of people cheered, waved and took pictures. Tears rolled down one woman's face as Obama spoke. "We love you, Obama!" another yelled out. "I love you back," Obama answered calmly, eliciting a roar from the crowd.

The same emotions were expressed up and down the tracks on the 137-mile journey, a trip that started in Philadelphia, Pennsylvania, and retraced the train ride Abraham Lincoln took on his way to becoming president in 1861. Watch Obama share the love »

As he did so often during his campaign, Obama drew upon American history in his remarks to pose a parallel to the country's current challenges. He noted the struggles of the colonials, the "first patriots," against the British.

"They were willing to put all they were and all they had on the line," Obama told the crowd in Baltimore. "Their lives, their fortune, and sacred honor for a set of ideals that continue to light the world: that we are all equal. That our rights to life, liberty and the pursuit of happiness come not from our laws but from our Maker."

Later he said, "the American Revolution was, and remains, an ongoing struggle in the minds and hearts of the people."

Inauguration coverage Coverage of Obama's inauguration continues Sunday with the debut of John King's "State of the Union" and a three-hour special at 2 p.m. ET

Sunday, beginning 9 a.m. ET see full schedule »

And, as in Philadelphia, Obama alluded to, but did not name, the president who inspired his train journey. The soon-to-be president used a call-to-action uttered by Lincoln in his inaugural address in 1861, an appeal to Americans' "better angels."

Obama, who will take up what he called the country's "enormous" challenges in fewer than 72 hours, noted that they will probably not be solved quickly.

"There will be false starts; there will be setbacks," he said. "There will be frustrations and disappointments. I will make some mistakes. But we will be called to show patience even as we act with fierce urgency."

He added, "So, Baltimore, starting now, let's take up in our own lives the work of perfecting our union," an appeal that brought forth a loud rumble of approval.

Obama arrived later in Washington, where he will take the oath of office Tuesday. He did not have a speaking event there Saturday.

Before getting on board the train in Philadelphia, the president-elect implored Americans to commit to a new declaration of independence -- rejecting ideology and bigotry -- as he acknowledged that the nation faces severe challenges.

"Only a handful of times in our history has a generation been confronted with challenges so vast," he said at a town hall meeting in Philadelphia's 30th Street Station.

"An economy that is faltering. Two wars: one that needs to be ended responsibly, one that needs to be waged wisely. A planet that is warming from our unsustainable dependence on oil."

"What is required is a new declaration of independence, not just in our nation but in our own lives -- from ideology and small thinking, prejudice and bigotry -- an appeal not to our easy instincts but to our 'better angels,' " he said, using a phrase from Lincoln's inaugural address.

The train stopped in Wilmington, Delaware, to pick up Vice President-elect Joe Biden and his family and then headed to Baltimore, Maryland, on its way to Washington.

The train made its first "slow roll" in Claymont, Delaware, allowing Obama to wave at cheering residents gathered near the tracks. Claymont is also the town where Biden's family moved in 1953, when he was 10 years old. iReport.com: Is the train coming to your town? Send us your photos

Security for Obama's train ride was tight. Law enforcement officers from 40 jurisdictions provided protection from the ground. The U.S. Coast Guard was stationed on waterways along the route as well.

The Federal Aviation Administration established "moving" flight restrictions that prevented private pilots, news helicopters, balloonists and others from getting anywhere near the train.

The FAA is imposing additional airspace restrictions in Washington on Sunday during pre-inaugural activities and from 10 a.m. to 6 p.m. Tuesday, the day of the inauguration. Watch how security will protect Obama on way to Washington »

Nearly 2 million people are expected to hit the streets of Washington on Tuesday. Police will shut bridges across the Potomac River into the city, along with a huge chunk of downtown. People coming from Virginia will have to walk or take public transport, such as the area's Metro subway system. Read about the times and places for inaugural events »

Two of the major routes coming into the city -- Interstates 395 and 66 -- will be closed to inbound traffic, at least for private vehicles.

Amtrak said it has increased the number and length of trains running to Washington on Inauguration Day. Tickets are still available but are going fast, it said. Watch more on inauguration transportation and security plans »

Security officials also say charter buses, taxis and car services are an option for those attending.

CNN producer Rachel Streitfeld contributed to this report.

All About Barack Obama • Joseph Biden