A note written by Jared Lee Loughner ahead of his shooting rampage in Tucson appears to show that he made careful preparations to assassinate Gabrielle Giffords, the Arizona congresswoman gravely wounded in the attack that also killed six other people.

The existence of the note is revealed in court papers filed after Loughner, 22, was charged on Sunday with murder and attempted assassination. The FBI document says that on an envelope Loughner wrote "I planned ahead", "My assassination" and "Giffords". He then signed the note.

The envelope was kept in a safe at Loughner's home alongside a letter from Giffords in 2007 thanking him for attending an earlier open air constituency meeting of the kind he attacked on Saturday.

The papers also reveal that Loughner bought the semi-automatic Glock pistol six weeks ago.

Giffords, 40, is in a critical condition after being shot in the head at close range. Loughner is expected to appear in court later today as the FBI continues to try to establish a motive for the attack.

The FBI director, Robert Mueller, who travelled to Tucson, Arizona, to take charge of the investigation, said that one focus of the inquiry is whether far-right organisations and websites played a role.

"The ubiquitous nature of the internet means that not only threats, but hate speech and other inciteful speech is much more readily available to individuals than quite clearly it was eight or 10 or 15 years ago," he said.

Investigators are exploring suspected links between Loughner and an online publication known for its strongly anti-immigrant stance, American Renaissance. It has denied any links to the accused killer.

The Southern Poverty Law Centre, one of America's leading trackers of hate crimes, said there are signs in some of Loughner's writings of far-right influence. Mark Potok, the director of research on hate groups at the centre, drew attention to Loughner's online ramblings that reject the US currency.

"At one point, Loughner refers disparagingly to 'currency that's not backed by gold or silver'. The idea that silver and gold are the only 'constitutional' money is widespread in the anti-government 'Patriot' movement that produced so much violence in the 1990s," he said.

Potok said the Patriot movement believes that paper money issued by the government is not legal tender. He said there were also clues to Loughner's thinking in his internet postings in which he accused the government of "mind control on the people by controlling grammar".

Potok said that fits with the theory of a Patriot conspiracy theorist who claims that the government uses grammar to "enslave" Americans.

On Loughner's first encounter with Giffords, at a constituency event in 2007, he is reported to have asked her: "How do you know words mean anything?"

A former friend told the Wall Street Journal that he became "aggravated" when Giffords responded in Spanish before moving on with the meeting.

Other organisations monitoring extremist groups have noted that Loughner spoke despairingly of a "second American constitution", a reference used by some extreme rightwingers to post-civil war constitutional amendments that ended slavery and gave former slaves citizenship.

"One thing that seems clear is that Giffords, who was terribly wounded but survived, was the nearest and most obvious representative of 'the government' that Loughner could find. Another is that he likely absorbed some of his anger from the vitriolic political atmosphere in the United States in general and Arizona in particular," said Potok.

Acquaintances of Loughner have related hearing him rant about issues such as the national currency and language control.

Lynda Sorenson, 52, who attended a community college algebra class with Loughner last year, wrote emails to friends describing him causing disruption and expressing fears that he might be dangerous.

"We do have one student in the class who was disruptive today, I'm not certain yet if he was on drugs (as one person surmised) or disturbed. He scares me a bit. The teacher tried to throw him out and he refused to go, so I talked to the teacher afterward. Hopefully he will be out of class very soon, and not come back with an automatic weapon," Sorenson wrote on 1 June.

A fortnight later, Sorenson said of Loughner: "We have a mentally unstable person in the class that scares the living crap out of me. He is one of those whose picture you see on the news, after he has come into class with an automatic weapon. Everyone interviewed would say, 'Yeah, he was in my math class and he was really weird.' I sit by the door with my purse handy. If you see it on the news one night, know that I got out fast …"

Loughner was later asked to leave the class.

Giffords's doctors say her chances of survival are good but have not said how complete her recovery will be. One of her surgeons, Dr Peter Rhee, has experience as a military doctor in Afghanistan and Iraq.

"I never thought I would experience something like this in my own backyard," he said.