He took the two kids to the beach in Hampton Bays as a favor for a friend, police said.

Southampton Town Police said Oscar Ferreira, 56, left them there for "several hours" unsupervised.

The Hampton Bays man was arrested Wednesday, charged with two counts of endangering the welfare of a child in the Monday incident, police said.

Police learned of the incident when a beachgoer found the two children, ages 6 and 8, on Dune Road attempting to walk home. The beachgoer called 911 and the children were turned over to police.

No one was injured.

Ferreira was issued an appearance ticket for a later date.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Wild weather on LI ... Deported LI bagel store manager speaks out ... Top holiday movies to see ... Visiting one of LI's best pizzerias ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Wild weather on LI ... Deported LI bagel store manager speaks out ... Top holiday movies to see ... Visiting one of LI's best pizzerias ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME