An East Islip man, 23, was walking on Rider Avenue near Terry Street at 4:40 a.m. when the two men approached and one of them pulled a knife, police said.
The robbers took the victim's iPhone and about $200 in cash, police said.
A witness called police after the two robbers fled, a police spokesman said. Police responding to the call found one of the alleged robbers Christopher Washington, 23, of Coram, about a half mile away on Route 112. The other alleged robber, Stephan Riley, 22, of Holbrook, had returned to the scene of the crime where he was arrested. Police said they recovered the victim's money and phone.
Washington and Riley were charged with first-degree robbery. They are scheduled to be arraigned Sunday at First District Court in Central Islip.
Police are still investigating the robbery.
Detectives are asking anyone with information on the crime or similar incidents to call the Fifth Squad at 631-854-8552 or to make an anonymous call to Crime Stoppers at 800-220-8477.