Consider the following problem: For given graphs G and F1,…,Fk, find a coloring of the edges of G with k colors such that G does not contain Fi in color i. Rödl and Ruciński studied this problem for the random graph Gn,p in the symmetric case when k is fixed and F1 = ··· = Fk = F. They proved that such a coloring exists asymptotically almost surely (a.a.s.) provided that p ≤ bn−β for some constants b = b(F,k) and β = β(F). This result is essentially best possible because for p ≥ Bn−β, where B = B(F,k) is a large constant, such an edge‐coloring does not exist. Kohayakawa and Kreuter conjectured a threshold function n for arbitrary F1,…,Fk.In this article we address the case when F1,…,Fk are cliques of different sizes and propose an algorithm that a.a.s. finds a valid k‐edge‐coloring of Gn,p with p ≤ bn−β for some constant b = b(F1,…,Fk), where β = β(F1,…,Fk) as conjectured. With a few exceptions, this algorithm also works in the general symmetric case. We also show that there exists a constant B = B(F1,…,Fk) such that for p ≥ Bn−β the random graph Gn,p a.a.s. does not have a valid k‐edge‐coloring provided the so‐called KŁR‐conjecture holds. © 2008 Wiley Periodicals, Inc. Random Struct. Alg., 2009