1. If he had attained the age of consent i.e 18 years and it was a consensual act then it was not illegal. However, if a complaint is filed by him now then police will have to investigate the matter and call you to appear before it. If a FIR gets filed against you then apply for anticipatory bail.
2. If he blackmails you then go to the nearest police station to file a FIR under Section 506 IPC for criminal intimidation.