Former NFL No. 1 draft pick Mario Williams is facing trespassing charges after allegedly trying to enter his ex-girlfriend’s apartment using a pilfered garage-door opener and then engaging in a heated confrontation with the woman that was captured on video.

In the video footage, published Wednesday by TMZ Sports, the woman — who also was identified as the mother of Williams’ child — is heard repeatedly asking a manic-looking Williams, “How did you get in here?”

Williams appears to accuse the woman of accessing the contents of his iCloud.

Williams told cops he “gained access to the garage by making a copy of the resident’s garage door opener using a universal garage door opener,” according to the gossip website. The incident occurred early Tuesday in Katy, Texas.

The 34-year-old was arrested on misdemeanor criminal trespassing charges and was released on a $100 bond. Court records indicate Williams has to “undergo a mental health or intellectual disability assessment” before he is due back in court on Aug. 27.

The woman previously filed a restraining order against Williams, according to KHOU in Houston.

The Houston Texans took Williams with the No. 1 pick over star running back Reggie Bush in 2006, and he never lived up to the hype conferred by that draft status or by the infamous $100 million contract he received from the Buffalo Bills prior to the 2012 season. He last played for the Miami Dolphins in 2016, finishing with 97.5 sacks and three All-Pro nods in 11 seasons.

Williams pocketed $120.4 million over the course of his career, according to Spotrac.