SELMA, Ala. — In the poinsettia-trimmed pulpit of Ebenezer Missionary Baptist Church on Sunday morning, the Rev. James Perkins Jr., the first black mayor of a city where the right to vote was won in blood, announced his support for the Democrat Doug Jones in Alabama’s special Senate election. He reminded his Selma congregants, without telling them how to vote, that sheep are to follow their shepherd.
Not that the congregation needed much reminding.
With only hours until the polls open on Tuesday in this unlikeliest of battleground states, Democrats are deploying a sprawling, multimillion-dollar get-out-the-vote operation in an effort to steal away a Senate seat and reduce the Republican majority to a single vote.
A constellation of liberal groups outside the state has showered money and manpower on turnout efforts aimed at helping Mr. Jones. But they are working discreetly, hoping to avoid the appearance of trying to dictate whom Alabamians should support.
As part of those efforts, former Gov. Deval Patrick of Massachusetts, only the country’s second elected black governor, was at Ebenezer to make the case for Mr. Jones. In the vestibule were stacks of sample ballots for the Democrat, whose smiling visage was on literature left on every car in the parking lot. A few blocks away, at the foot of the Edmund Pettus Bridge, the site of Bloody Sunday in 1965, the message was starker: “Vote or Die” read a sign aimed at this region’s black majority, whose turnout could decide the race.
On Sunday, though, it was not an out-of-state liberal who offered an unexpected lift to Mr. Jones. Senator Richard C. Shelby, perhaps the most prominent of Alabama Republicans, made a rare national television appearance to excoriate Roy S. Moore, the Republican nominee and his would-be Senate colleague.
“I couldn’t vote for Roy Moore,” Mr. Shelby, who had previously said he would write in the name of another Republican, said on CNN. “The state of Alabama deserves better.”
Mr. Jones’s campaign immediately turned Mr. Shelby’s remarks into an online advertisement and was planning to play parts of the interview in automated phone calls to Republican households, according to a Jones adviser.
Public polling suggests that Mr. Jones remains a slight underdog in the election, though private surveys for both parties have found the race to be a tossup, according to people briefed on the data. Still, Alabama has not elected a Democrat to the Senate since 1992. President Trump won the state by nearly 28 percentage points, and Democrats have had a series of letdowns in special congressional elections this year in traditionally Republican territory.
Republicans caution that Mr. Moore’s grass-roots following should not be underestimated, and he has mobilized a volunteer network, stocked with conservative Christian activists, that has repeatedly propelled him to statewide office over the objections of establishment leaders turned off by his divisive social views.
But Mr. Moore has been abandoned by some in his party and has effectively gone underground for the race’s final days rather than face questions about allegations of sexual misconduct with teenage girls. Should Mr. Jones be able to capitalize on that and score an upset here, it will be in large part because liberals quietly flooded Alabama with resources.
“If it’s possible to win a race in Alabama, we’ll do it,” said Paul Maslin, Mr. Jones’s pollster. “It may not be.”
Former President Barack Obama has taped a get-out-the-vote call for Mr. Jones, but on Sunday night the candidate’s advisers were still weighing whether to use it. Mr. Obama is beloved among black voters but is still unpopular among some of the Republican-leaning white voters Mr. Jones needs.
But Mr. Jones’s campaign is highlighting Mr. Obama in another way. It has deluged black radio stations with commercials promoting Mr. Jones, one of which describes Mr. Moore as “backed by the racist alt-right groups” and brands him “a birther, still insisting that Barack Obama was born in Kenya and isn’t an American.”
The commercials also highlight Mr. Jones’s tenure as a United States attorney in the 1990s, when he prosecuted the white supremacists who bombed the 16th Street Baptist Church in Birmingham, noting that he “took on the Klan and got justice.”
And in a bid to laser-target black voters, Mr. Jones’s campaign has bought a huge file of cellphone numbers for African-Americans, which it plans to use for a get-out-the-vote appeal via text message, two people familiar with the plan said. To win, Democrats say that African-Americans must represent at least 25 percent of those who turn out to vote.
Less visibly, some national Democratic groups have channeled resources to the state. A top aide at the Democratic Senatorial Campaign Committee with experience in Southern politics, Tracey Lewis, has been in the state for weeks advising Mr. Jones’s campaign. A national Democratic consulting firm known for its work overseeing paid canvassers is also aiding Mr. Jones. And a Democratic “super PAC,” Highway 31, has sprung up to air radio and television ads supporting Mr. Jones.
Indivisible, the liberal grass-roots network, held training sessions in Alabama, sending veteran activists into the state to hone the tactics of local organizers. The Human Rights Campaign, a national gay rights group, had multiple paid organizers on the ground and more than a dozen volunteers, one organizer outside Mr. Jones’s campaign office said.
A group called Open Progress is funding a large text message campaign with African-Americans. A nonpartisan group called the Voter Participation Center is reaching over 300,000 black voters here with direct mail and text messages. And NextGen America, a national group funded by Tom Steyer, the billionaire environmental activist, lent an organizer to an Alabama-centric group, Woke Vote, to help mobilize historically black college campuses.
But in a sign of the sensitivity about outside influence in the race, Mr. Steyer, who poured millions into last month’s election for governor of Virginia, has not spent any money directly backing Mr. Jones, an aide said. Unlike in Virginia, Mr. Jones cannot simply rely upon energized liberals and moderates to carry him to victory. He must also persuade some Republicans to support him in this deep-red state.
“Jones needs the upscale soccer moms in Homewood to turn out for him,” said Steve Flowers, a former state legislator and author of a book on Alabama politics, referring to a Birmingham suburb.
A handful of Homewood women in their 40s who attended a Jones rally in downtown Birmingham on Sunday said they were eager to send a message to Mr. Moore and Mr. Trump, who has backed his candidacy, and had been making phone calls for Mr. Jones.
“We are not unicorns,” said Jennifer Andress, who is on the Homewood City Council.
But Ms. Andress and her friends were less certain that some of their more Republican-leaning contemporaries could bring themselves to back a Democrat, although they were heartened to have seen red “No Moore” signs on lawns of some Republican neighbors.
At the rally, Senator Cory Booker of New Jersey delivered a fierce stump speech — part pep talk, part high-concept peroration — to volunteers, before laying out a more clinical case for Mr. Jones to reporters outside. Without mentioning Mr. Moore’s name, Mr. Booker warned that electing him would humiliate Alabama and cripple the state’s ability to wrangle favors from Washington.
“My friends on the other side of the aisle have told me, and said publicly, that they’re going to try to oust him as soon as he’s there,” Mr. Booker said of Mr. Moore. “Time is wasting. There are big bills coming through, spending bills and the like. Alabama needs its share.”
Mr. Jones, he insisted, is “somebody that Republicans are going to work with and Democrats are going to work with.”
With Mr. Jones and his newly visible allies stumping across the state, Mr. Moore has been comparatively invisible in the final stage of the race, trusting his appeal to Alabama’s intensely conservative culture and Mr. Trump’s late exhortations to carry the day. Mr. Trump has given a series of impassioned pleas for Mr. Moore, via Twitter and at his own campaign-style rally in the Florida Panhandle on Friday.
Mr. Moore has not held a public campaign event since early last week, and has announced just one before the vote on Tuesday — a rally on Monday night in rural southeastern Alabama, alongside Stephen K. Bannon, the former White House adviser, and Representative Louie Gohmert of Texas.
The candidate gave a rare interview over the weekend to a local television program, “The Voice of Alabama Politics,” jabbing at Mr. Jones as a “liberal Democrat” and casting himself as the truer avatar of Alabama values. Yet even with a gentle interlocutor, Mr. Moore spent long minutes parrying allegations that he had sexually abused girls. “I did not date underage women,” he said. “I did not molest anyone, and so these allegations are false.”
To some veteran Alabama Democrats, Mr. Moore appears to be motivating Democrats as much as his own supporters. Outside the 16th Street Baptist Church on Sunday, after a service during which the congregation was exhorted repeatedly to head to the polls, David Russell, 65, said he saw Mr. Moore as a powerful spur to the Democratic base.
“We are going to use Roy Moore just like we used to use George Wallace standing in the schoolhouse door,” Mr. Russell said, referring to the state’s former governor who championed segregation — and who was elected four times.