We analyze by cross-sectional transmission electron microscopy the threadin
g dislocation behavior when crossing an AlN intermediate layer in the GaN/A
lN/GaN/sapphire system grown by molecular beam epitaxy. Dislocation behavio
r is explained calculating critical thickness by applying the Fischer model
to an,AlN layer capped with GaN. Due to elastic interaction between straig
ht misfit dislocations, the Matthews and Blakeslee model does not explain t
he observed dislocation behavior. The understanding of critical thickness i
n the studied system permits to select the AlN interlayer thickness that mi
nimizes the threading dislocation density in the capped GaN layer.