Beat someone to the punch

Meaning: To do something before someone else has the opportunity to do it.

Example: I was going to announce the news, but Sarah beat me to the punch.