U.S. District Judge Larry Burns said the sentence was "astronomical" but "justified." He said the facts show Loughner was not insane at the time of the shooting, that he went to the scene of the crime "with the purpose of shooting Ms. Giffords," and lay in wait, The Arizona Republic reported.
"He knew what he was doing," Burns said.
Burns also noted the sentence was provided for under a plea agreement Loughner had accepted.
Giffords was in the Tucson federal courtroom for the sentencing of Loughner, who shot her in the head in a 2011 rampage.
Giffords' husband, Mark Kelly, spoke on his wife's behalf during the hearing. Loughner shot and killed six people and wounded 13 -- including Giffords -- as she conducted a meet-and-greet with constituents.
Kelly told Loughner: "After today, Gabby and I are done thinking about you.
"You may have put a bullet in her head but you haven't put a dent in her spirit."
A federal prosecutor said Loughner "was a young man with a twisted belief that government was responsible for all his failings," the newspaper reported.
Loughner and federal prosecutors reached a plea agreement in August that will allow him to live but ensures he remains behind bars.
As part of the deal, Loughner, 24, pleaded guilty to 19 of the more than 50 charges he faced. The remaining offenses were dropped in exchange for the guilty pleas, a written agreement filed in court indicated.
Prosecutors agreed to the plea after considering Loughner's history of mental illness and the comments of victims and their families. In August, a judge determined Loughner competent to stand trial.
When the plea agreement was reached, Kelly released a statement saying he and Giffords were "satisfied" with the U.S. Justice Department's decision to accept the agreement instead of seeking the death penalty and a trial that could have forced surviving victims, their families and the families of the dead to relive that day.
On Jan. 8, 2011, Loughner opened fire at Giffords' Congress on Your Corner event outside a Tucson supermarket. Among the dead were U.S. District Judge John Roll, Giffords aide Gabriel Zimmerman and 9-year-old Christina Taylor-Green. Giffords underwent intense rehabilitation and returned to the House to vote to avoid a default on the nation's debt last summer.
Giffords, who resigned in January to focus on her rehabilitation, led the Pledge of Allegiance during the Democratic National Convention in Charlotte, N.C.