Protecting the US president has presented the secret service with the greatest challenge in its history. But who wants to kill him? And how likely are they to succeed?

The following correction was printed in the Guardian's Corrections and clarifications column, Wednesday 10 March 2010

The piece below about US presidential security and the guarding of Barack Obama said that one reason John Kennedy was exposed to assassination was that he had asked for the bullet-proof glass bubble to be taken off the limousine that would carry him though Dallas in 1963. In fact, the removable plastic roof panels were not bullet-proof.

The Southern Poverty Law Center began life in 1971 as a tiny law firm specialising in civil rights cases. It took on the might of the Ku Klux Klan, and was duly rewarded by having its offices razed and its senior lawyers targeted for assassination. But it kept on going and grew to be one of the most respected monitoring groups of rightwing extremism in America today.

Recently it brought out a report called Terror From the Right, which identifies, in chronological order, the serious home-grown plots, conspiracies and racist rampages that have been cooked up in America since the Oklahoma City bomb in 1995. The list runs to 10 pages of closely printed type and itemises 75 domestic terrorism events, from plans to bomb government buildings to attempts to kill judges and politicians.

Each of the incidents aimed to change the political face of America through violence, courtesy of groups with such titles as Aryan People's Republic, The New Order and The Hated. But in the summer of 2008 the chronology takes on a sharp change of tack. Entries, which had been running at one or two per year, start coming faster. And instead of a variety of different targets, one name crops up time and time again: Barack Obama.

The first such entry is for 8 June 2008. Six people, linked to a militia group in rural Pennsylvania, are arrested with stockpiles of assault rifles and homemade bombs. One of the six allegedly tells the authorities that he intended to shoot black people from a rooftop and predicts civil war should Obama, who five days previously had cleared the Democratic nomination for president, be elected to the White House.

Next entry: 24 August 2008. The day before the opening of the Democratic convention in Denver at which Obama was nominated, three white supremacists are arrested in possession of high-powered rifles and camouflage clothing. They are talking about assassinating Obama.

24 October 2008: Less than two weeks before the election, two white supremacists are arrested in Tennessee over a bizarre plan to kill more than 100 black people, including Obama.

21 January 2009: The day after Obama's inauguration, a white man is arrested in Massachusetts, having allegedly killed two black immigrants and injured a third. He says he was "fighting for a dying race".

10 June 2009: James von Brunn, aged 88, walks into the Holocaust Memorial Museum in Washington and shoots dead a security guard. Von Brunn, who died last month in jail awaiting trial, left a note that read: "Obama was created by Jews."

In the 13 months that Barack Obama has been the occupant of the Oval Office he has been the subject of an extraordinary outpouring of emotion from the American electorate. At the start it was largely adulatory, though more recently the adoration has been drowned out by a cacophony of criticism from tea party activists, birthers, global-warming deniers and viewers of Fox News. At the same time, largely hidden from view, there has been a layer of antagonism towards Obama that lies well beyond the boundaries of reasonable political debate.

That has been a fact of life for Obama and his family since long before they took the keys to the White House. On 2 May 2007, fully 18 months before election day, he was assigned a secret service detail – much earlier than any other presidential candidate in American history. The precise reasons for the move have never been disclosed, but there was certainly a mood in the air sufficiently palpable to disconcert Michelle Obama. A senior US official in the State Department has told the Guardian that before he decided to run for the presidency, Obama had actively to win Michelle over to the idea by assuaging her fears about the potential of an attack on him, her and/or their two daughters.

Michelle would have been aware of the backstory here: that Colin Powell had declined to run for the 1996 Republican nomination partly because his wife Alma feared his assassination at the hands of white supremacists. Over the course of the long presidential race, Michelle spoke openly about her anxieties and how she had determined to overcome them, telling 60 Minutes that she had decided to fling herself into the race because "I am tired of being afraid".

According to John Heilemann and Mark Halperin's new account of the 2008 election, Game Change [UK title, Race of a Lifetime], she eventually felt relaxed enough to crack sardonic jokes about the subject. "I've already gone out and increased our life insurance on [Barack]," she quipped. "You just can't be too careful!" But as the Southern Poverty Law Center survey shows, the issue of safety and the 44th president remains anything but a laughing matter. "Virtually every domestic terrorist event we have identified since June 2008 – when it became obvious that Obama was going to win – has been directly related to him," says the author of the report, Mark Potok.

Apart from the Obamas themselves, the burden of such a threat falls primarily on the shoulders of the US secret service, and as Joseph Petro, head of global security for Citigroup, puts it, the challenges facing the service today are unlike any period that has gone before. On top of all the usual risks associated with guarding the world's most powerful politician, there is now the added, explosive ingredient of his race. "As the first black president he creates a whole other set of issues for the secret service to deal with," he says.

Petro can claim to be something of an expert in this area: he spent 23 years as a special agent in the service, four of them, from 1982 to 1986, as the man who stood beside Ronald Reagan. He knows what it's like to be the last line of protection, how it feels to be in a milling crowd in which you are surrounded by thousands of potential assailants, what it is to live with the constant knowledge that any mistake – a split second taking your eye off the ball – could be fatal.

Petro has a formula for measuring the potential dangers for any particular incumbent of the White House. You take the general atmosphere of the times in which they are in office and combine it with the specific personality that the president brings to the job. In both regards, he says, Obama presents a huge task.

"In Obama, we have a president with a very unique personality who likes to be out with the people. Put that together with the political atmosphere of these times that is highly partisan and vitriolic, then include race, and we've got a big challenge. There's no margin for error."

Petro's point about the role the president's personality plays in his own safety is ably illustrated by the single most disastrous failure in the secret service's history – the event that every incoming trainee agent spends hours and hours studying until it is drilled into his or her bone marrow. Judged by modern security standards, the shooting of John F Kennedy in Dallas on 22 November 1963 should for several reasons never have happened. The parade route Kennedy took was publicised in advance – a cardinal sin by the rule book of today. Lee Harvey Oswald had a relatively easy line of fire from the sixth floor of the Texas School Book Depository, which would these days have been thoroughly swept and sealed off. But it was the orders given by Kennedy himself that did for him – the president asked for the bullet-proof glass bubble to be taken off his limousine and for agents not to ride on the back of the car, thus leaving himself utterly exposed.

In the last analysis, as Kennedy proved at his own cost, a president can only be as safe as he allows himself to be. Agents can advise the commander-in-chief what is best for his security, but they cannot give him orders. "The secret service would want to take the president to Camp David straight after the inauguration and keep him there out of any contact with the public for the next four years. But they know that's not possible," Petro says.

During his presidential campaign, Obama would regularly mingle among crowds of astonishing size. But since his inauguration he has clearly responded to the guidance of his protecting agents, detaching himself considerably from direct public engagement. To some extent, that is only normal – he is no longer running in an election. But for a president who promised to break down barriers between politicians and people, it is noticeable how sparingly he is seen in public these days, and how the events he does appear at are almost invariably staged indoors.

Over the years, the secret service has developed a range of technological devices for improving security. Petro recalls asking Reagan on several occasions to wear a bulletproof vest. (Reagan would grumble and groan but usually comply.) Over the last decade, such innovations have come thick and fast. A whole new array of gadgetry has been added to the service's armoury, from face-recognition technology to a new generation of armoured vehicles. Obama rides in a Cadillac with military grade eight-inch thick doors; on election night in November 2008 he gave his victory speech to a crowd of almost a quarter of a million people from behind bullet-proof glass walls designed to foil sniper attacks.

But gadgetry is only as effective as the people who use it. In the last analysis, the human factor remains supreme, as was illustrated last November when two reality show hopefuls gatecrashed a White House function, penetrating the inner core of the building and shaking Obama's hand. As it happened, they had no malice towards the president. But in the mindset of the mortified secret service that didn't matter; they could have done.

Which on some level is the nature of the beast: being president of the United States is a high-risk enterprise, as Abraham Lincoln, James Garfield, William McKinley and John Kennedy all found out the hard way. Danger can come at a president from any number of directions. It can come from the lone deranged gunman. It can come too, theoretically, from international terrorism of the Islamist variety. But al-Qaida experts point out that the closest the group has come to a direct attack on the president was 9/11 itself. "From al-Qaida's view, to assassinate the president would be very desirable," says Yehudit Barsky, a terrorism specialist at the American Jewish Committee. "But it would be difficult for them to go after him not because they don't want to but because their capacity is so impaired."

Which is why in the overall assessment of risk to Obama, so much attention is settling on rightwing extremist groups who are already operating inside America, are armed and ideologically motivated, and in some cases potentially capable of desperate acts. This brings us back to the Southern Poverty Law Center, which has been tracking the activity of potentially violent militia groups since the last great wave in the 1990s when the so-called Patriot movement ballooned in proportion to rising rightwing anger towards Bill Clinton and fears of impending gun control. That wave of opprobrium culminated in the Oklahoma bombing in which 168 died and 680 more were injured.

The centre's latest report, released last week, records an astonishing mushrooming in extremist anti-government Patriot groups who see the Obama administration as a plot to impose "one-world government" on liberty-loving Americans. The numbers leapt from 149 groups in 2008 to 512 groups in 2009, of which 127 were classed as paramilitary groups.

"We know there has been a spike in activity across a broad range of things, particularly with regard to the notion that this government is illegitimate," says Brian Levin, a criminologist who heads the Center for the Study of Hate and Extremism at California State University. Levin says the phenomenon is evident in rural areas around the Appalachian mountains and Great Lakes and into the west and Pacific north-west, where new armed militia groups are spontaneously emerging; and he has no doubt about why this is happening right now: "We've always had people who hate the president, we've always had conspiracies, but the fact that we have a black president at a time of economic tumult makes these conspiracies much more volatile among a far wider group of people."

Chip Berlet, an analyst of rightwing extremism at the Massachusetts-based group Political Research Associates, estimates that there have been nine murders by individuals who have white supremacist, xenophobic or antisemitic leanings since the inauguration of Obama. Berlet sees similarities in the current foment to the militia agitation of the 1990s. "Anger is spilling over from people who believe Obama is coming to remove their liberties, seize their guns, enslave the white American nation. What's new is that they can now recruit and communicate online, and that makes it very much more dangerous for the president."

Montana is one of the rural states where resurgent extreme rightwing activity can be detected. Travis McAdam has been tracking such activity for the last two decades on behalf of the Montana Human Rights Network, so has a unique vantage point for what is going on today. "The hatred that's there is very real. It's more than a gut-level hatred of having an African-American as president, it's also ideological – these people see black people as sub-human. Groups are popping up that have a new message and are using Obama to recruit new members."

White supremacist forums that provide closed talking shops for members only have been abuzz with anti-Obama rhetoric since the presidential election. In one such talkboard, monitored by a watchdog group, a correspondent writes: "if we want to see the overthrow or the cleansing of society then we should support Obama being where he is! I believe in the coming war. With this Nig as President he will just speed up the process. He's a catylist! Is'nt this what we want?" Another says: "Our backs are really against the wall now. We need progressive activism and we need to be solution orientated. For a Whiter future for our children." A third says: "I never thought I'd ever see the day when a monkey ran my country & I'm 34. I weep for our children."

For McAdam, the crucial question is how to sort this body of vitriol into its constituent parts – to separate out those individuals and groups who may be offensive and repulsive in their choice of words but are essentially harmless, from those that have the potential to be truly violent. He likes to think of it as a funnel, at the top of which are many people drawn to radical right groups for all sorts of reasons – gun rights, taxation, Obama-as-alien, or whatever. Most never go further than that level, but some do. "As they dig into the subject, going down into the funnel, they start to lose connection with the social networks around them that keep them tied to normality. Down, down they go, and eventually out the other end of the funnel emerges the Oklahoma bomber, Timothy McVeigh, who says, 'Our country is under attack, I must do something about it.'"

It's the thought that some may be emerging from the end of the funnel at this politically charged moment, McAdam says, that bothers him so, and makes him think that "violence against President Obama is a real concern".

McVeigh, executed in June 2001, is a name that crops up frequently among the extremism monitors. It comes up again when Mark Potok gives his last word on the threat to Barack Obama. The white supremacists and anti-government militia who are out to get the president should not be underestimated, he says. "These groups aren't al-Qaida. Most of them look vastly more bumbling than effective." But then he adds: "It only takes one to get through. Timothy McVeigh taught us that."

• This article was amended on 8 March 2010 to add the UK title of the US book Game Change.