A method for synchronizing clocks in a communication network, wherein a first clock of a first network element is used for synchronizing second clocks of one or more second network elements (SL1,..., SLN), comprising the steps: a) recording a first sequence of first messages (Sync) transmitted from the first network element to a second network element (SL1,..., SLN) and/or a second sequence of second messages (Req) transmitted from the second network element (SL1,..., SLN) to the first network element, wherein the first sequence includes for each first message (Sync) an information about a first delay for transmitting the first message (Sync) from the first to the second network element (MA, SL1,..., SLN) and wherein the second sequence includes for each second message (Req) an information about a second delay for transmitting the second message (Req) from the second to the first network element (MA, SL1,..., SLN); characterized by the steps of: b) identifying a first set of first messages (Sync) out of the first sequence and/or a second set of second messages (Req) out of the second sequence, wherein each first message (Sync) of the first set is transmitted within a first delay below a first threshold function from the first to the second network element (MA, SL1,..., SLN) and wherein each second message (Req) of the second set is transmitted within a second delay below a second threshold function from the second to the first network element (MA, SL1,..., SLN), the first threshold function filtering first messages (Sync) with a minimum delay out of the first sequence and the second threshold function filtering second messages (Req) with a minimum delay out of the second sequence; c) estimating a line delay for messages transmitted between the first and the second network elements (MA, SL1,..., SLN) based on the first set and/or the second set and synchronizing the second clock with the first clock based on the estimated line delay, wherein d) the first threshold function is a constant function comprising the minimum of the first delays in the first sequence plus a first constant value and/or the second threshold function is constant function comprising the minimum of the second delays in the second sequence plus a second constant value, wherein e) the first and/or second constant values depend on the maximum clock frequency difference between the first clock and the second clock. a) recording a first sequence of first messages (Sync) transmitted from the first network element to a second network element (SL1,..., SLN) and/or a second sequence of second messages (Req) transmitted from the second network element (SL1,..., SLN) to the first network element, wherein the first sequence includes for each first message (Sync) an information about a first delay for transmitting the first message (Sync) from the first to the second network element (MA, SL1,..., SLN) and wherein the second sequence includes for each second message (Req) an information about a second delay for transmitting the second message (Req) from the second to the first network element (MA, SL1,..., SLN); characterized by the steps of: b) identifying a first set of first messages (Sync) out of the first sequence and/or a second set of second messages (Req) out of the second sequence, wherein each first message (Sync) of the first set is transmitted within a first delay below a first threshold function from the first to the second network element (MA, SL1,..., SLN) and wherein each second message (Req) of the second set is transmitted within a second delay below a second threshold function from the second to the first network element (MA, SL1,..., SLN), the first threshold function filtering first messages (Sync) with a minimum delay out of the first sequence and the second threshold function filtering second messages (Req) with a minimum delay out of the second sequence; c) estimating a line delay for messages transmitted between the first and the second network elements (MA, SL1,..., SLN) based on the first set and/or the second set and synchronizing the second clock with the first clock based on the estimated line delay, wherein d) the first threshold function is a constant function comprising the minimum of the first delays in the first sequence plus a first constant value and/or the second threshold function is constant function comprising the minimum of the second delays in the second sequence plus a second constant value, wherein e) the first and/or second constant values depend on the maximum clock frequency difference between the first clock and the second clock.