NEW YORK — The robbery crew that pulled off one of the biggest heists in U.S. history – the $6 million Lufthansa theft immortalized in “Goodfellas” – was elated at first but became fearful of being robbed itself, a turncoat mobster testified Tuesday at the trial of his former Mafia boss.

The defendant, Vincent Asaro, now 80, was “very happy, really euphoric” when he learned about the mountain of $100 bills scored in the armed holdup, Gaspare Valenti told a jury. “We thought there was going to be $2 million in cash and there was $6 million.”

But Valenti testified that Asaro warned him, “We’ve got to be real careful now. They’ll look to rob us. They’ll look to kill us. It could be anyone who hears of the score.”

The testimony marked the first time Valenti has given his blow-by-blow account of the heist. Prosecutors say he voluntarily came forward in 2008, implicated Asaro and agreed to testify against him in violation of the Mafia’s vow of silence.

Valenti testified that his involvement in the heist orchestrated by James “Jimmy the Gent” Burke – played by Robert De Niro in the movie – began when Asaro told him, “Jimmy Burke has a big score at the airport coming up, and you’re invited to go.”

The plan called for Valenti and another robber to take a stolen van to the airport terminal and break into a side entrance, he said. They teamed with other bandits who were holding workers hostage, he said.

The crew forced one of the workers to open a safe, where they discovered dozens of boxes containing packets holding $125,000 each, which they threw into the van, he said.

Burke “gave very little money out at the beginning,” Valenti said, and when he did, it was with a caveat: Don’t spend it in a lavish way that would draw attention.

The defense has accused Valenti of framing Asaro to win leniency in his own case.