We show that, if b∈L1(0,T;Lloc1(R)) has spatial derivative in the John-Nirenberg space BMO(R), then it generalizes a unique flow ϕ(t,⋅) which has an A∞(R) density for each time t∈[0,T]. Our condition on the map b is optimal and we also get a sharp quantitative estimate for the density. As a natural application we establish a well-posedness for the Cauchy problem of the transport equation in BMO(R).