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.

{articleGUID}

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. — FBI Houston (@FBIHouston) October 17, 2018

The mosque was rebuilt after a flood of donations came in to restore the facility.

In July 2017, the Victoria Islamic Centre posted a photograph of the new building on Facebook, “Almost there!” the post said. “Rebuilding with love.”

When Perez learned the Victoria Muslim community had raised money to rebuild the mosque, he told a witness he would burn the mosque down again if it was rebuilt, the Department of Justice said.

Mark Di Carlo, Perez’s defence attorney, says his client is “disappointed in his lengthy sentence” and will appeal his conviction.

Incidents of hate crimes in the US went up to 6,121 during 2016, seeing an increase of 4.6 percent compared with the previous year, according to data released by the FBI.

The crimes committed, particularly against African-Americans, Jews and Muslims, rose with a spike of 10 percent from 2014 to 2015.