A monthslong investigation resulted in the arrest of a Central Islip man Tuesday night, charged with attempting to set vehicles on fire outside a Commack bar in March, police said.

Alexander Rivera, 35, of 50 Hoffman Lane, "was seen pouring gasoline" over three vehicles in the parking lot of The Scene gentlemen's club on Motor Parkway early in the morning of March 16, Suffolk County police said in a news release Wednesday.

advertisement | advertise on newsday

A witness, who was in the parking lot when Rivera allegedly committed the crime at 2:40 a.m., then saw him flee the scene, police said.

Police did not say what evidence led to the identification of Rivera as the suspect.

He was arrested by Arson Section detectives at his home at 8:06 p.m. and charged with two counts of attempted arson. He was arraigned Wednesday in First District Court in Central Islip and held pending a bail of $150,000 bond or $50,000 cash. He was represented by Legal Aid, which has a policy of not commenting on cases.

With Ellen Yan