Green card holders with criminal offenses will now have a harder time fighting deportation orders after the Supreme Court ruled with the Trump administration on Thursday.

The split 5-4 ruling applied to the case of Andre Martello Barton, a non-citizen Georgia father of four who was charged with firearm and drug offenses after immigrating from Jamaica in the 1980s.

His crimes made him eligible to be deported, but Barton argued he was ineligible based on a law that allows some long-term legal US non-citizen residents to avoid expulsion.

Green card holders may apply to have their deportation order canceled if they have been living in the US continuously for at least seven years.

If they commit a statutory offense, their period of continuous residency goes back to zero under the “stop-time rule.”

Even though he was not seeking admission into the country and his crimes were not enough to deport him, the Supreme Court ruled that he would not be able to fight deportation charges.

In 1996, when he was a teenager, Barton was present when a friend fired a gun at the home of Barton’s ex-girlfriend in Georgia. And in 2007 and 2008, he was convicted of drug possession in the state.

Justice Brett Kavanaugh noted in his opinion for the court’s conservatives that it was important that Barton’s 1996 crime took place in the first seven years he was admitted to the country.

Kavanaugh wrote that “when a lawful permanent resident has amassed a criminal record of this kind,” immigration law makes them ineligible to ask to be allowed to stay in the country.

“Removal of a lawful permanent resident from the United States is a wrenching process, especially in light of the consequences for family members,” Kavanaugh wrote. “Removal is particularly difficult when it involves someone such as Barton who has spent most of his life in the United States.

“Congress made a choice, however, to authorize removal of non-citizens — even lawful permanent residents — who have committed certain serious crimes.”

The ruling is a major victory for the Trump administration who argued against Barton’s bid to avoid removal.