A twice-deported Jamaican hoodlum was able to sneak back illegally into the United States again — and nearly killed a Westchester County cop, law-enforcement sources told The Post.

Clare Greenland was busted on Nov. 9 for the attempted murder of Police Officer David Sanchez, the sources said.

He is believed to have entered the US in the late 1980s and went on to serve prison terms for everything from assaulting a cop to auto theft and arson, according to the sources.

He was initially tossed out of the country by Immigration and Customs Enforcement in 2009, authorities said.

After sneaking back into the US — and more run-ins with the law — he was booted again in 2015.

“ICE removed Greenland twice by air,” confirmed ICE spokeswoman Rachael Yong Yow.

But the undocumented Greenland, 53, was spotted at his old stomping ground in Westchester earlier this month, when cops saw him lurking in the parking lot of a Bedford car dealership, the sources said.

The dealership had been hit by a recent rash of thefts of tires, rims and other parts.

Police say Greenland, who has a wife in the area, sped off in a stolen vehicle. Sanchez, 36, gave chase and cornered the crook nearby.

Authorities say Greenland pulled a knife and stabbed at the officer.

“Thank God the officer was wearing a vest. I saw pictures of the vest — it was shredded and pierced dozens of times,” a source said.

Sanchez, who was not physically injured, declined to comment.

Greenland was charged with attempted murder, aggravated assault on a cop and criminal possession of a weapon. He is being held without bail until his next court date, Nov. 30.

The feds also are expected to charge him — again — with entering the country illegally.

Authorities say Greenland hasn’t revealed exactly how he has been getting back into the US.

“I can think of a million different ways he could have gotten here,’’ a source said, noting that Greenland could have hopped a flight to Mexico and crossed the border, or sailed directly to the US southern coast.

According to public records, Greenland once owned a boat, which he kept at an address in Florida.

A source with the Westchester DA said Greenland is looking at major time for his latest crime.

“Nobody wants to let this guy go ever again,” the source said.

ICE said that if convicted, Greenland would do his time stateside before it ships him out again.