A tourist sued the city for more than $4 million yesterday because his visit to Central Park ended in a side trip — to the slammer.

Yakov Dubin, of suburban Atlanta, was busted in August 2011 as part of the NYPD’s “Operation Lucky Bag,” a sting operation that targets crooks who steal decoy pocketbooks left unattended in public places.

Dubin’s suit says he, his wife and two teenage kids were strolling through the park when he stopped at a bench to tie his shoe.

While leaning over, Dubin, 49, spotted an “old and dirty purse sitting on the ground underneath the bench.”

After he tried in vain to find the owner — and his wife and kids were unable to find a park ranger — the suit says Dubin opened up the purse and discovered “an old hairbrush and $27 in cash inside, but no identification.”

“Finding no identification, or other way to identify the owner, Mr. Dubin removed the cash from the purse, with the intention to then find a park ranger or other officer, to which he could turn the money over,” court papers say.

But as the Dubins walked off, they were stopped by four or five plainclothes cops, who accused Dubin of stealing the dough.

Dubin said he tried to explain the situation, noting that he had just withdrawn $100 from an ATM and didn’t need the cash, but still got slapped into cuffs, — prompting his daughter Michelle, 17, to begin crying hysterically.

“One officer said, ‘Don’t worry, we’re going to put your daddy in a good jail,’ ” Dubin told The Post. “That’s exactly what he said, and they all laughed.”

Dubin said he spent several hours in a precinct-house lockup before getting sprung, then returned to New York more than a month later to plea-bargain to disorderly conduct and pay a $120 fine.

Dubin, who sells real-estate and runs an online bookstore, said the experience had ended his family’s tradition of visiting the Big Apple once or twice a year “because the kids like the shows and Broadway.”

”Not anymore,” he vowed. “I’m not going to spend my money in a city where you get arrested for no reasonI’m telling you, in Georgia, they think I’m making it up. Nobody believes you can be arrested for something like that.”

He said his friends and relatives back home were incredulous when he related his tale.

Dubin also said that while he was at the police station, he watched as several crime victims came in to report having various items — including an iPad, clothing and a bag — stolen from them in the park.

”I couldn’t believe New York City has the resources to have five undercover police officers sitting all day in the bushes looking for people like me,” he said.

Dubin, a Russian immigrant, further compared the arrest to the time he was busted in his native country during the 1980s for protesting the former Soviet Union’s refusal to let Jews emigrate to Israel and the U.S.

”The only difference was in the Soviet Union they beat the crap out of me at the police station,” he said.