The rule in the NFL (and college and high school) states that a play can NOT end on a defensive penalty. However, the game can end on an offensive penalty.