For months, Herman Cain languished on the margins of the Republican presidential campaign. But in the past few weeks, something happened that even Cain did not see coming. He became a front-runner for the nomination.

The Atlanta businessman has shot up in the polls and become a ubiquitous presence on national television. His “9-9-9” plan to reform the tax code has become a household term. His sense of humor and upbeat style have injected a bit of light into a campaign that has centered on the gloom of the economy.

Cain, who brought to the race no obvious constituency to back him, has benefited as other conservative favorites took turns in the spotlight and then fell away, bowing out — or flaming out. But he also has used a series of televised debates to raise his profile and establish himself as a powerful communicator with a simple plan to restart the economy.

“My message of common-sense solutions is resonating with people,” Cain said in an interview. “People around the country are starting to know who I am and starting to identify me with solutions, not rhetoric.”

Cain said he had long expected to gain momentum, but he did not foresee the recent “explosion” of interest in his campaign. Last month, he overwhelmingly won a Florida GOP straw poll, and in a recent Washington Post poll he tied with Texas Gov. Rick Perry for second place, with 16 percent.

But it is not at all clear that Cain can maintain his momentum or support a successful presidential campaign.

He has committed some early missteps, saying he would not appoint a Muslim to his Cabinet and stumbling on questions about the Middle East and the war in Afghanistan. He has since said he is aggressively studying up on foreign policy and that he meant to say he would not appoint a “jihadist” to his Cabinet.

Cain has not released his fundraising figures for the quarter that ended Sept. 30, but he raised about $2.5 million in the previous quarter, much less than most of his rivals for the nomination. And until very recently, Cain had drawn very little scrutiny from the media or criticism from his opponents.

He has had staff shakeups in Iowa, where workers had complained that Cain was not taking the campaign seriously, and in New Hampshire. He has been conspicuously absent — since August — from Iowa, an important state for a social conservative such as Cain to win.

“I think he’s at this point not a viable candidate in Iowa,” said Steve Deace, a conservative talk show host who is influential in conservative circles in the state. “The race appears to be about raising his profile and not running for president. He’s not surrounded himself with the best people and he’s not serious about running for president.”

Cain, 65, has reinforced that belief by spending much of his time this week promoting his new autobiography, “This Is Herman Cain!

Asked about the skepticism, Cain chuckled. “All I can say is they are dead wrong,” he said. “And they don’t know Herman Cain. Anybody that knows me knows I would not do something like this to self-promote.”

Many of Cain’s supporters initially considered candidates who were viewed as more viable. Robert Owens, 63, said would have backed real estate magnate Donald Trump had he decided to enter the presidential fray, and he considered both Rep. Michele Bachmann (Minn.) and Perry. He eventually settled on Cain.

“He makes more sense than anybody else,” said Owens, a retired truck driver from Florida. “And it’s just time for something different.”

Many of his supporters say they are drawn to his 9-9-9 plan, which would do away with the current tax system and replace it with a 9 percent flat income tax, a 9 percent corporate tax and a 9 percent national sales tax. Cain has said the measure would be roughly neutral in terms of revenue with the current system but would lead to economic growth.

Cain, who is African American, was raised in government housing projects in Atlanta by a mother who was a maid and a father who was a chauffeur. He grew up “po’, which is even worse than being poor,” he wrote in his book, which ranked in ninth place Thursday on Amazon’s list of bestsellers.

Though his most well-known job was as chief executive officer of Godfather’s Pizza, he has also worked as a mathematician, a minister, a radio show host and a motivational speaker. He ran a short-lived campaign for president in 2000 and an unsuccessful one for a Georgia Senate seat in 2004. In July, he released an album called “Sunday Morning,” on which he sings gospel tunes.

Cain — who sometimes refers to himself in the third person or as “The Hermanator” — is known for his positive attitude. Among the achievements he lists in his book is his creation at the Burger King chain of the “BEAMER” program, which encouraged cashiers to smile at the register.

His first star turn as an outspoken conservative came in 1994, when President Bill Clinton was in Omaha for a televised town hall meeting on the proposed health-care overhaul that year. Cain, who was then running Godfather’s, attended the meeting and grabbed headlines by challenging the president on his analysis of the cost to businesses.

“That morning I woke up and turned on the news, and they said that Clinton had gotten bushwhacked, basically, by someone at the meeting,” recalled Spencer Wiggins, a longtime friend and colleague of Cain’s who was living in Nashville. “As soon as they said it, I knew who it was. It was Herman.”

In 2006, Cain was diagnosed with colon cancer, which had spread to his liver. His friend and former campaign worker Matt Carrothers recalls that Cain would crack jokes in the chemotherapy room to cheer up his fellow patients. Surgeons removed 30 percent of Cain’s colon and 70 percent of his liver. He said he is cancer-free.

Cain’s status as a black Republican has added a complexity to his presidential run. He has charmed conservative audiences with his wry references to his race, calling himself the “dark horse” and joking that if he is the “flavor of the week,” as he has been derisively called, he must be that old standby, “black walnut.”

But many conservatives turned on him when he remarked that the name of a hunting camp leased by Perry was “insensitive” because it included a slur against blacks. And he was widely criticized from the other end of the political spectrum for saying that more liberal blacks had been “brainwashed” into supporting Democrats.

In his book, Cain writes that, as a child, he was forced to sit in the “colored” section of the bus, and while in graduate school in Indiana he found it so difficult to find a barber who would cut black hair that he bought clippers and cut his own — a practice he holds onto today.

He tells of a time when he and his brother sneaked a taste of the “whites only” water fountain. “Then we looked at each other and said, ‘You know what? The ‘whites only’ water tastes just the same as the ‘coloreds’ does!’ ”

Asked recently on Fox News why he’s not more bitter about his treatment under segregation, Cain answered with an optimistic spin.

“I’m not angry with America, because America has something that a lot of other countries don’t have: The ability to change,” he responded. “That’s the greatness of this country. We have always had struggles throughout our short 235-year history. Why be bitter? Why not embrace the change, especially since it’s positive?”

Cain’s dim view of Occupy Wall Street protesters

Fact Checker: Obama’s news conference Pinocchios

For Anita Hill, the Clarence Thomas hearings haven’t really ended

Perry disputes hunting camp story

Brown takes heat on comment about Warren

News researcher Lucy Shackelford and staff writer Scott Clement contributed to this report.