Seventeen Freedom Flotilla refugees, detained in Atlanta's federal penitentiary more than 14 months for alleged crimes back home, today walked out of prison free men, the first wave of Cubans to be released en masse as a result of a courtroom showdown between a federal judge and the Justice Department.

"Finally, I feel like I have arrived in the United States," said Lazardo Batista-Padron, 23, a Havana University student who came to America to study and wound up in prison for 17 months. He had used a cousin's prison records to get a seat on the Mariel boatlift, he said, and was jailed as a convict. He hadn't told U.S. officials his real identity, fearing he would be jailed for impersonating his cousin.

"This is the greatest day of my life, because I am getting freedom after doing nothing," he said. "Now I have freedom from prison and Cuba. That is all I ever wanted, to come to a free country."

"Free air smells good, doesn't it?" asked a prison official as 13 men piled into a green and white van for the airport to catch flights to Miami, Los Angeles, Puerto Rico and elsewhere. Four others awaited their local sponsors to drive them away.

As the hour of freedom approached for the first of 381 Cubans ordered released by U.S. District Judge Marvin H. Shoob, the prison began to shake with a chorus of cheers, 1,800 Cubans chanting "Libertad! Libertad! Libertad!"

Then came the word, and the 17 walked from prison, waving, exuberant, but perplexed. Miguel Angel Jiminez, 35, a former mechanic who spent eight years in prison in Cuba for sabotaging government cars, said he had spent 14 months in jail watching TV news accounts of his dilemma and still did not understand why he had been put in jail.

"Ronald Reagan opposes communism and so do I," he said. "I am on his side."

Lawyers had tried to explain, in prison visits, he said, that the attorney general wanted to make sure no "hard-core" criminals got released by mistake, since Premier Fidel Castro emptied his jails and sent his prisoners to America. Indeed, the Justice Department says perhaps as many as 400 serious felons, dangerous men, are being held in the federal penitentiary and should stay there. Judge Shoob agrees, but has ordered the release of Cubans held solely because they lack entry papers, and those whose cases had been favorably adjudicated by an immigration judge.

He declared that the "continued detention of these Cuban refugees with no history of criminality after approximately 15 months no longer reflects 'the humane qualities of an enlightened civilization,'" but rather is "an abuse of discretion of the parole authority."

Batista-Padron, Jiminez and the others are among 155 men ordered freed first. They were found to be no threat to society by Carter administration officials who had approved their release. But Attorney General William French Smith, pending a policy review, halted it until this week.

In a separate action today, Judge Shoob agreed to modify his orders freeing another 226 Cubans to give the government time to review each case, even though Justice Department attorneys have not objected in court to releasing specific individuals on the list. A special government review panel is expected to arrive in Atlanta Monday to begin poring over the flies. And the judge has scheduled hearings for the rest of the 1,800 jailed Cubans next month.

But any review by the government panel should not hinder the release of the 155 ordered freed first. According to a government list, at least half of those men spent time in Cuban jails for stealing food.

Ernesto Fernandez-Perez, 24, a former mechanic who was released today, said he was imprisoned four years for stealing 25 pounds of rice to feed 15 brothers and sisters. "We didn't have enough to eat," he said.

Despite his 14 months in prison here, he said he didn't want to go back to Cuba. Shoob has ordered the government not to deport him, or any of the 1,800 detainees -- the administration's avowed policy -- because he believes they would be imprisoned and tortured if returned to Cuba. A hearing on a temporary injunction against the government to prevent any such deportation, even though Castro hasn't agreed to take back any "Marielitos," is scheduled for next month.

Some of the Cubans released today walked to freedom in prison-issue pink shirts, dark slacks and tight shoes. They said they had fought Castro and were surprised that officials here had not given them medals instead of locking them away.

Roberto Rodriguez, 39, spent 10 years in prison in Cuba for propagandizing against Castro, he said. He was released in 1970, then promptly joined the Frente Obrero Anti-Communiste, an anti-Castro workers party, and began putting up posters. He was jailed in Cuba, he said, and later in this country.

"I thought America would welcome me with open arms," he said, "never put me in jail. I wouldn't have come to the United States if I had known what would happen. I spent my youth in prison in Cuba for political reasons and couldn't conceive I'd be put in jail here."

Batista-Padron was off to Miami to join his father and attempt to put his life together again. He had first sought refuge from Castro in the Peruvian embassy in Havana, then left Mariel with the prison discharge papers of his cousin, jailed for demonstrating against Castro, according to immigration documents.

The last 17 months have been "like a dream," he said. "I felt dead in prison." He harbors some bitterness toward the U.S. government. "They have stolen from me one and a half years of my life, my youth," he said.

In prison, he forgot his table manners, he said. He saw a man stabbed to death outside his cell because he refused to lend a prisoner a comb. "Inside prison, people died for little things," he said.

He has learned a lesson. "Now that I know what a prison is like, I will never go back." He said he couldn't wait to "change my clothes -- my shoes are tight -- and put on some cologne to take away the smell of prison."