After Hanuman destroyed Ashok Vatika and killed many rakshasas, Indrajit captured him using the Brahmastra - a divine weapon given by Brahma that could not be escaped. Even Hanuman had to respect this weapon and allowed himself to be bound, which led to his meeting with Ravana.