The man accused of attempting to assassinate congresswoman Gabrielle Giffords appeared in an Arizona court yesterday. The defendant will remain in federal custody pending a detention hearing.

The 22-year-old Jared Loughner is currently being held in a corrections facility separate from convicted prisoners.

It's understood that Loughner allegedly bought the Glock pistol used in Saturday’s horrific attack at the Sportsman’s Warehouse in Tucson, in November.

Court documents also reveal that Loughner had previous contact with the Democratic congresswoman.

In a letter from Gifford, 40, Loughner had been thanked for attending a previous Congress on your Corner event at a mall in Tucson in 2007.

But this time Giffords was shot in the head at her first 2011 public meet and greet with constituents outside a Tuscon supermarket.

Pima County sheriff Clarence Dupnik said yesterday that he believed Loughner had acted alone.

Loughner appeared before US Magistrate Judge Lawrence Anderson on Monday where he was accused of killing six people, including a federal judge, an aide to Giffords and a nine-year-old girl born on September 11, 2001. Fourteen others were wounded, including Giffords.

Loughner potentially faces the death penalty for each of the two murder charges. He also faces up to life in prison on the attempted assassination charge, and up to 20 years in prison on each of the two attempted murder charges.