Here the writer assumes that the reader will remember that Jesus had said Peter would deny him before the rooster crowed. Alternate translation: "immediately the rooster crowed, just as Jesus had said would happen" (See: [[rc://en/ta/man/translate/figs-explicit]])