The NFL and the referees' union reached a tentative contract agreement at midnight ET Thursday, ending an impasse that began in June when the league locked out the officials and used replacements instead.