We prove that if A⊆[X,2X] and B⊆[Y,2Y] are sets of integers such that gcd(a,b)≥D for at least δ∣A∣∣B∣ pairs (a,b)∈A×B then ∣A∣∣B∣≪εδ−2−εXY/D2. This is a new result even when δ=1. The proof uses ideas of Koukoulopoulos and Maynard and some additional combinatorial arguments.