An Indonesian teenager narrowly escaped a horrific sexual assault after a colony of ants started biting her attacker.

The 16-year-old, identified by her initials A.S., had been approached by Toni Irawan, 29, who asked her to go for a drive around Sukamaju, South Sulawesi province.

Irawan allegedly asked the 16-year-old for sex, and when she refused, he dragged her into some nearby bushes intending to rape her, where a colony of black ants attacked the pair.

The suspect Toni Irawan (centre) is accused of trying to rape a 16-year-old girl, who managed to escape after ants began biting him

According to local media, Irawan had repeatedly asked the teenager to have sex with him during their drive, but she said no and tried to run away when they stopped in a village.

He caught up with her and dragged her back into the vehicle, before taking her to another village to 'wash the car'.

This time he forced himself on the girl, dragging her into some nearby bushes and throwing her to the ground.

The incident took place in Sukamaju in the central Indonesian province of South Sulawesi on January 19

Reports said that just as he was about to rape the girl, they were both suddenly bitten by a colony of black ants.

In the confusion, the teenager managed to get up and run to nearby houses to call for help.

Sukamaju police chief Iptu Alimin Pammu told local media that Irawan has since been arrested and is currently on remand as the investigation continues.

If found guilty, he faces between three and 15 years in prison.