LAS VEGAS (AP) — A British man diagnosed with mental illness was sentenced Tuesday to about four more months in a U.S. prison for trying to grab a police officer's gun in a plan to kill presidential candidate Donald Trump at a campaign rally last June in Las Vegas.

Michael Steven Sandford, 20, was sentenced by U.S. District Judge James Mahan to one year and one day in prison with credit for time served and good behavior behind bars.

The sentence was about six months less than prosecutors sought, but the judge said Sandford will be deported when he's released.

Mahan blamed the June 18 attempt in a crowded Las Vegas strip casino ballroom on Sandford's mental illness, calling Sandford's effort a "goofy, crazy stunt" fueled by voices he thought he was hearing.

Sandford choked back tears as he stood wearing an orange jail jumpsuit, flanked by his lawyers while photos of his family were projected onto a large screen. Sandford's mother, father, grandmother and 4-year-old sister were in the courtroom.

"I know saying sorry is not enough," Sandford told the judge. "I don't want to hurt anyone. I wish I could make this better, I do."

"You're not alone," Mahan replied. "There are people out there who care about you."

When Michael Sandford pleaded guilty in September to being an illegal alien in possession of a firearm and disrupting an official function, he told the judge he was being treated with the anti-psychotic medication risperidone.

His mother's lawyer in London, Saimo Chahal, has previously said Sandford suffers seizures, obsession-compulsion, anxiety and autism spectrum disorders, and that a psychiatrist determined that he was delusional at the time of the attempted attack.

"It's important you stay on your medication," Mahan told Sandford. "Your family's waiting for you. You want to get back to England."

Sandford has already served six months in jail since his arrest, and has about two months off for good behavior behind bars, prosecutor Daniel Schiess said. That means he could go free by mid-April.

Sandford could have faced up to 20 years in prison if convicted of both charges at a trial, and up to 30 years on the three charges he initially faced. One charge of being an illegal alien knowingly in possession of a firearm was dropped.

One of Sandford's lawyers, Ryan Norwood, said his client was happy with the sentence and wants to return to Britain as soon as possible.

The light is at the end of the tunnel here," Norwood said. "He's happy about that part of it."

Court documents said Sandford acknowledged telling a Las Vegas police officer that he wanted a Trump autograph and then used both hands to try to grab the officer's gun.

Sandford told a federal agent he arrived in Las Vegas two days before the campaign rally, rented a 9mm pistol and practiced shooting a gun for the first time in his life at a gun range.

Schiess told the judge that Sandford planned for more than a year to attack Trump, and considered using a rifle and a knife before deciding on a handgun.

It was not clear if Trump recognized a threat before officers escorted Sandford out of the 1,500-seat theater at the Treasure Island hotel-casino. But he noticed the commotion and thanked police as Sandford was ushered away.

FILE - In this June 18, 2016 file photo, police remove Michael Steven Sandford as Republican presidential candidate Donald Trump speaks at the Treasure Island hotel and casino in Las Vegas. On Tuesday, Dec. 13, 2016, the British man diagnosed with mental illness was sentenced to about four more months in a U.S. prison for trying to grab a police officer's gun in a plan to kill Trump at a campaign rally last June in Las Vegas. (AP Photo/John Locher, File)

Lynne Sandford, center, mother of Michael Sandford, walks out of a federal courthouse with Christine Sandford, left, and Paul Davey, right, after the sentencing of her son, Tuesday, Dec. 13, 2016, in Las Vegas. Michael Sandford, a British man diagnosed with mental illness, was sentenced to about four more months for attempting to grab a police officer's gun after planning to kill Donald Trump at a rally in Las Vegas in June. (AP Photo/John Locher)

Lynne Sandford, left, mother of Michael Sandford, walks out of a federal courthouse after the sentencing of her son, Tuesday, Dec. 13, 2016, in Las Vegas. Michael Sandford was sentenced for attempting to grab a police officer's gun after planning to kill Donald Trump at a rally in Las Vegas in June. (AP Photo/John Locher)

Brenda Weksler, attorney for Michael Sandford, speaks with the media outside of a federal courthouse after the sentencing of Sandford, Tuesday, Dec. 13, 2016, in Las Vegas. Sandford was sentenced for attempting to grab a police officer's gun after planning to kill Donald Trump at a rally in Las Vegas in June. (AP Photo/John Locher)

Paul Davey, father of Michael Sandford, walks out of a federal courthouse after the sentencing of his son, Tuesday, Dec. 13, 2016, in Las Vegas. Michael Sandford, a British man diagnosed with mental illness, was sentenced to about four more months for attempting to grab a police officer's gun after planning to kill Donald Trump at a rally in Las Vegas in June. (AP Photo/John Locher)

Ryan Norwood, attorney for Michael Sandford, speaks with the media outside of a federal courthouse after the sentencing of Sandford, Tuesday, Dec. 13, 2016, in Las Vegas. Sandford was sentenced for attempting to grab a police officer's gun after planning to kill Donald Trump at a rally in Las Vegas in June. (AP Photo/John Locher)

ATLANTA (AP) — Stacey Abrams broke the rules of politics until the very end.The Georgia Democrat who came about 60,000 votes shy of becoming America's first black female governor refused to follow the traditional script for defeated politicians who offer gracious congratulations to their victorious competitor and gently exit the stage.

NEW YORK (AP) — Even before they announce their White House intentions, New Hampshire's ambitious neighbors are in the midst of a shadow campaign to shape the nation's first presidential primary election of the 2020 season.

TALLAHASSEE, Fla. (AP) — Democratic Sen. Bill Nelson, a Florida political icon whose career highlight may have been a trip on the space shuttle, conceded his bitterly close re-election bid to Republican Rick Scott on Sunday, ceding a razor-thin race to the outgoing governor after a tense and sometimes turbulent recount.

TALLAHASSEE, Fla. (AP) — Andrew Gillum, who tried to energize Florida's young and minority voters through a Democratic coalition seeking to end two decades of Republican control of the governor's office, ended his hard-fought campaign Saturday as the state's first black nominee for the post.

TALLAHASSEE, Fla. (AP) — Andrew Gillum, who tried to energize Florida's young and minority voters through a Democratic coalition seeking to end two decades of Republican control of the governor's office, ended his hard-fought campaign Saturday as the state's first black nominee for the post.