beat to the punch

[beat to the punch] or [beat to the draw] {v. phr.}, {slang} To do something before another person has a chance to do it.

John was going to apply for the job, but Ted beat him to the draw.

Lois bought the dress before Mary could beat her to the punch.