Two men were still on the loose Thursday afternoon after allegedly trying to rape an 18-year-old girl in Ridgewood, Queens, police said.

According to police, one of the men approached the teen from behind near Putnam and Seneca Avenues, and punched her in the head at about 2:50 a.m. on Wednesday. The second man then choked her and covered her mouth with his hand before trying, unsuccessfully, to take her bag, police said.

The first man then began to sexually assault the girl but got spooked and fled when a passerby approached, police said.

The girl was taken to Woodhull Medical Center where she was treated and released, police said.

Both men are described as Hispanic, in their early 30s and about 5-feet-5-inches. The second man had a ponytail, police said.