Let D(n,d)={A|A is an n×n primitive matrix with d positive diagonal elements}. Itis well known that γ(A)≤2n-d-1 for A∈D(n,d). Suppose D_1(n,d)={A∈D(n,d) |γ(A)=2n-d-1} is the set of extremal matrices in D(n,d). This paper gives a characteriza-tion of the set D_1(n,d).