Marq Perez had set fire to the Victoria Islamic Center, a crime seen as part of a wave of bigotry towards US Muslims.

An arsonist convicted of burning down a mosque in the United States last year has been sentenced to more than 24 years in prison for a crime prosecutors said was motivated by hate.

Marq Perez, 26, was convicted of hate crime and felony arson in July for setting fire to the Victoria Islamic Center in Texas on January 28, 2017.

At the sentencing, senior US District Judge John Rainey said hate crimes were "a cancer to our society" and "this conduct would not be tolerated in our society," the US Attorney's Office for the Southern District of Texas said.

During a week-long trial in a federal court in Texas, prosecutors called the crime "a simple, straightforward case of hate".

The jury also found that Perez possessed an unregistered destructive device for a separate but related incident that occurred on January 15, 2017.

One person, who was with Perez on the night of the fire, said he was excited and "jumping up and down like a little kid" while watching the mosque burn, the New York Times reported.

Prosecutors said Perez broke into the mosque a week before the fire; the man later placed papers inside the building and set them on fire with a lighter, a witness said, according to prosecutors.

"Everyone in this country has the right to worship freely without fear of violence," said Acting Assistant Attorney General John Gore.

"This defendant terrorised the Muslim community in Victoria, and the Department partnered with federal, state, and local agencies to ensure that the person responsible for this heinous hate crime would be found and prosecuted," he added.

The crime was seen by Islamic rights groups as part of a growing wave of bigotry towards the Muslims in the US.

The court said that the most important factor in determining punishment was stating that "this conduct would not be tolerated in our society."

Rainey noted that Perez wanted to send a message to the Muslim community, but the court was also sending a message to Perez and others like him, Texas News reported.

Marq Vincent Perez was just sentenced to over 24 years in prison for his attack on the Victoria Islamic Center. The #FBI investigated the hate crime aspect of Perez's activities and proudly partnered with @ATFHou@VictoriaPDtx@TxDPS to bring this case to a successful conclusion.