Abstract: HgCdTe semiconductor material having an n-type epitaxial layer is grown on a substrate. A graded p-type epitaxial layer is grown on the n-type layer. The p-type layer is graded such that the large bandgap region is adjacent the heterojunction with the narrow bandgap region at the surface of this layer. The periphery of the p-type layer is then etched to expose the large bandgap material. A HgCdTe passivation layer may then be formed on the p-type layer. A resultant structure is then mesa etched. A metal, such as indium, is formed along the walls of the mesa structure. Indium is selected to form a good ohmic contact with the n-type layer and a Schottky barrier with the large bandgap exposed edge of the p-type layer. In this way, the PN junction is passivated at the large bandgap material. The remaining narrow bandgap material in the p-type will form a good ohmic contact to a metal contact formed on this layer.