It’s city versus country in a legal battle between a Manhattan man who wants to keep his rooftop oasis — an actual cabin overlooking a mini-meadow atop his West Village loft — and regulators who say it must come down.

“I did it because I love the garden. I love the fact that we did a green roof before anyone else,” said David Puchkoff, whose country living, six stories up, has landed swoon-worthy features in the New York Times and National Geographic.

He was inspired to build the rooftop getaway after visiting a friend’s lakefront house in rural Pennsylvania.

Drought-resistant sedums, cacti, Japanese maples and a bushy pink rosebush dominate the rooftop paradise.

And the rustic cabin boasts a wooden porch with a swing — and even an outdoor shower off to one side.

But city investigators came sniffing around 719 Greenwich St. after receiving an anonymous complaint last year about work being performed without a permit.

“I haven’t done any other work in there except to water my garden, so who am I annoying?” Puchkoff told The Post Tuesday.

He suspects a neighbor lodged the complaint, but he said no one’s ever confronted him with concerns.

“Is there anyone over there who’s against what I am doing?” Puchkoff shouted from his Greenwich Street rooftop while showing a reporter around the garden.

The 78-year-old developer says he filed all the proper plans with the city Department of Buildings when he constructed the roof terrace in 2003.

Puchkoff, head of the real estate development firm DP Associates, converted the building from a warehouse into 14 luxury co-op apartments.

But when the Buildings Department inspector visited the rooftop last year, he determined that Puchkoff’s current certificate of occupancy does not allow the cabin or surrounding garden.

He was fined $1,200 and told to apply for a new certificate of occupancy.

A city administrative law judge tossed the fine in April, but then the Buildings Department had it reinstated on appeal in September.

So Puchkoff sued the agency to have his little slice of country comfort in the Big Apple declared legal.

His attorney, Richard Lobel, said the fine was based on a bogus complaint. He added that the DOB even signed off on the project twice, most recently in 1999.

“No one even breathed a word that there was a safety concern,” Lobel said.

Asked if an envious neighbor could have called in the complaint, Lobel posited, “If I was to make a guess, I’d say that could be it.”

A spokesman said the city Law Department is reviewing the suit.