An MTA worker busted after taking a photo of a subway train slammed the city with a $2 million wrongful-arrest lawsuit yesterday.

Robert Taylor, 31, an MTA station agent and train buff, says he spent three hours locked up at a station house after cops arrested him in February at the Freeman Street station in The Bronx because he had taken a shot of a train pulling in. The charges were eventually dismissed.

A transit spokesman said that the law against taking such photos was overturned many years ago, but that officers can challenge anyone taking pictures in nonpublic or sensitive areas.