Police say they've arrested man who tried to pull a woman’s pants down as she entered her apartment in an attempt to rape her last week in Queens.

Larry Williams, 24, of Brooklyn followed the woman into her building in the Ridgewood section of Queens just after 9 a.m., according to the NYPD.

Once inside the building, he followed her to her apartment and tried to pull her pants down as she was walking in, police said. She was able to fight him off and get into her apartment, locking him out. Police say the suspect tried to push the door open but was unsuccessful and fled.

The woman was uninjured.

Williams was charged with attempted rape, burglary, sex abuse and forcible touching. Attorney information was not immediately known.