A dark, gangly figure emerged from the Boston and Providence Railroad depot in Park Square on Sept. 15, 1848. Except for his unusually lofty, angular frame, Abraham Lincoln would have attracted little notice as he walked the byways of Boston. The obscure 39-year-old freshman congressman was on his first visit to the city and his first venture into presidential politics. Lincoln’s long gait carried him to lodgings at the elegant Tremont House at the corner of Tremont and Beacon, just steps from the bones of Hancock, Revere, and the other patriots in the adjacent Granary Burying Ground.

The Abraham Lincoln who visited Massachusetts in 1848 was not yet leading man material. But on a 13-day trip in which he spoke before audiences in Boston and eight nearby towns, Lincoln got his first glimpse at the intensity of antislavery sentiment in Massachusetts and emerged with a deeper sense that political action on slavery was necessary.

The Lincoln who has entered historical legend—and who is now the subject of a major new Hollywood movie—is the autodidact born in the Kentucky log cabin, molded in the Indiana and Illinois plains by the great American tradition of self-reliance, and sent to Washington from a state still not far from the frontier. But Boston played an important role in developing his views on the defining moral issue of the century—and of his presidency.

As archives and newspapers of the time reveal, abolitionist Boston—both during his 1848 visit and his White House years—helped prod a once cautious, pragmatic politician to follow his conscience and push for the Emancipation Proclamation and the 13th Amendment.

Ironically, Lincoln’s mission in Boston on that 1848 visit was to stump for one of America’s largest slaveholders. With just weeks to go before the presidential election, Whig Party leaders dispatched Lincoln to Massachusetts to bolster support for their nominee, Zachary Taylor, the 63-year-old general and veteran of the Mexican-American War, who owned more than 100 slaves on his Mississippi plantation.

Although Lincoln opposed the war and saw slavery as an evil institution, he had been among the first congressmen to jump on the Taylor bandwagon for a purely political reason: He thought the slave-owning war hero could win. In the antislavery cauldron of Boston, however, frustration at Taylor’s nomination had bubbled to the surface. The staunch Whig stronghold had begun to crack, with supporters defecting to the upstart Free Soil Party and its nominee, former president Martin Van Buren. Lincoln’s task was to help blunt the third party’s momentum.

As Lincoln canvassed the Bay State, he played the familiar role of campaign surrogate as attack dog. Before audiences in Boston, Worcester, New Bedford, Lowell, Dedham, Taunton, Chelsea, Cambridge, and Dorchester, he blasted Van Buren as the “artful dodger” of Kinderhook for shifting parties and flip-flopping. Newspapers of the time reported his warning that a vote for Van Buren was a vote for the Democratic candidate, Lewis Cass, who supported popular sovereignty and the possible extension of slavery.

In general, Lincoln’s first foray into the spotlight of a presidential campaign won positive reviews. His stump speech, which generally lasted more than an hour, drew plaudits in the region’s newspapers, but his unusual appearance and unique speaking style tended to draw almost equal commentary. “Mr. Lincoln has a very tall and thin figure, with an intellectual face, showing a searching mind, and a cool judgment,” the Boston Daily Advertiser reported. Audiences accustomed to the grandiose oratory of Daniel Webster or Edward Everett were taken by Lincoln’s folksier demeanor as he shed his coat, rolled up his shirtsleeves, and loosened his necktie like a prairie lawyer prosecuting his case.

Lincoln’s final night in Boston would have a lasting effect on the Illinois congressman. Rain had forced a giant open-air Whig rally in Court Square to be moved inside to the Tremont Temple church, a former theater that had once been managed by famed tragedian Junius Brutus Booth, father of John Wilkes Booth. Former governor William H. Seward of New York was the headline speaker; it was there that Lincoln first met his future rival for the 1860 Republican nomination and the man who would ultimately join his wartime Cabinet as Secretary of State.

That night, Lincoln delivered his standard stump speech against Van Buren. The Boston Courier later called it “a most forcible and convincing speech, which drew down thunders of applause.” But Seward’s speech was bolder. Unlike other speakers that evening, who shied away from the topic, Seward focused his remarks almost entirely on slavery, and predicted that the slaves would be freed during his lifetime.

Their efforts were not in vain: Taylor carried Massachusetts and 14 of the other 29 states on his way to the presidency. With the exception of Worcester, the Whig candidate won every town in which Lincoln spoke. In fact, though, Lincoln’s own role in electing Taylor was likely minimal. By the end of his campaign swing, Boston dailies were still misspelling his name as “Abram Lincoln.” The influence of Boston on Lincoln, meanwhile, would endure over days and years to come.

***

Seward’s antislavery speech at Tremont Temple moved Lincoln profoundly. Shortly after the rally, he told the former New York governor, “I have been thinking about what you said in your speech. I reckon you are right. We have got to deal with this slavery question, and got to give more attention to it hereafter than we have been doing.” Even though the two men did not meet again for a dozen years, Lincoln in 1860 still vividly recalled their meeting in Boston: “Twelve years ago you told me that this cause would be successful, and ever since I have believed that it would be.”

Boston Globe/File

The statue of Lincoln in Park Square. Its inscription reads: “A race set free and the country at peace--Lincoln rests from his labors.”

‘I have been thinking about what you said in your speech. I reckon you are right. We have got to deal with this slavery question, and got to give more attention to it hereafter than we have been doing.’

Perhaps spurred by Seward’s sentiments, Lincoln returned to Congress and immediately drafted a proposal for the gradual emancipation of slaves in the District of Columbia; on the proslavery side, the proposal also included compensation for slave owners and the arrest of all fugitive slaves in the capital. This compromise measure was ultimately scuttled by zealous lawmakers on both sides of the slavery issue, and caused Boston abolitionist Wendell Phillips, frustrated at Lincoln’s tentative approach on such a clear moral issue, to call him “that slave hound from Illinois.”

But Lincoln’s conversion to the cause was still unfolding. Over the next decade, his own furor for the antislavery cause deepened to match the passion he had encountered in Massachusetts and ultimately forged his political destiny. The state’s antislavery Whigs and those Free Soilers whom Lincoln railed against in 1848 helped launch the Republican Party, which nominated the former Illinois congressman as its standard-bearer in 1860 on a platform advocating against slavery’s spread. In the general election, Lincoln carried Massachusetts easily.

Once Lincoln was in the White House, Boston’s support for—and influence on—the new president continued. Radical Boston abolitionists such as Phillips, Julia Ward Howe, and William Lloyd Garrison kept the pressure on Lincoln to follow his ideals, and when war broke out, Bostonians enthusiastically answered his call for volunteers. Four days after the first shots were fired at Fort Sumter, crowds lined the city streets to cheer the parading Sixth Massachusetts Volunteer Regiment as it left to protect the nation’s capital. Attacked by Confederate sympathizers in Baltimore, four of the unit’s soldiers became the first to spill blood for the Union cause. When other state units failed to arrive in Washington, Lincoln complained to the Massachusetts militiamen, “You are the only Northern realities.”

Once those Bay State soldiers and the rest of the Union Army turned the tide of the Civil War, Lincoln finally issued the Emancipation Proclamation in 1863, and in a nod to the moral leadership of Massachusetts abolitionists, he symbolically gave the pen used to sign the document to longtime Boston antislavery crusader George Livermore. That gift symbolized just how much the politician who came to Boston in 1848 seeking votes for a slaveholder had evolved.

Today, tucked in a corner of Park Square near the spot where Lincoln first set foot in the city, stands an enduring monument to the Great Emancipator. At its base is an inscription to Lincoln’s final legacy to Massachusetts and beyond: “A race set free and the country at peace—Lincoln rests from his labors.”

Christopher Klein is the author of the forthcoming biography “Strong Boy: The Life and Times of John L. Sullivan.” E-mail him at chris@christopherklein.com.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.