A Connecticut man was arrested after he tried to copy a slew of kiddie porn photos at a local Walgreens, authorities said.

Clemente Cabassa, 57, of Manchester, was busted Monday in connection to the May 21 incident, according to the Manchester Police Department.

Cabassa had walked into the drugstore on Main Street that day and asked to have images from his cell phone put on a CD, cops said.

“Once the Walgreens worker started to download the photos, he noticed there were several images of child porn and he called the police,” Manchester Police Department Lt. Ryan Shea, one of the responding officers, told The Post Thursday.

At the time, Cabassa was free to go after police confiscated his cell phone.

“We had to do forensics on his devices,” Shea explained. “We couldn’t make an on-site arrest without determining how the images came onto his phone.”

Police investigated the matter and Cabassa was arrested and charged with first-degree possession of child pornography.

The Hartford Courant, citing an arrest warrant, said authorities found that Cabassa had inquired earlier about downloading photos at the Walgreens and told workers that he did not want anyone to see the images because they were of naked women.

When one of the Walgreens employees took Cabassa’s phone to upload the photos, about 1000 images began to download, the news outlet reported.

As the images were downloading, Cabassa told the worker the pictures came from Pakistan “and nobody could do anything about it here in the United States,” the Hartford Courant reported, citing the arrest warrant.

Cabassa ultimately admitted to police that he did have child pornography on his phone.

He claimed that the children in the photos were “Facebook friends” who had sent him the images from Pakistan and Afghanistan “where he believed the pictures were legal,” the newspaper reported.

Police found 45 images and one video on Cabassa’s phone that depicted child pornography, according to the news outlet.