Magnetic resonance (MR) is a proven, nondestructive analytical technique in chemistry and medicine. The sensitivity of a MR experiment is principally dependent on the strength and homogeneity of a polarizing static magnetic field, termed Bo. This requirement has traditionally limited MR experiments to a 'closed' configuration of magnets or wires generating a highly uniform Bo, but limiting the size of the sample that can be investigated To remove this size requirement, 'open' or unilateral sensors have been developed, in which a planar arrangement of magnets generates a suitable Bo at a location displaced from the sensor. This configuration increases the range of samples that can be examined, at the expense of Bo homogeneity. This paper presents the design of a portable, unilateral MR sensor suitable for nondestructive moisture detection. The sensor comprises an array of permanent magnets, designed using an inversion approach in which a target magnetic field is specified in a volume over the array. Using an analytical optimization, the magnet sizes, strengths, and positions are then determined to give the target field The result is a large region offield homogeneity, displaced -4.5cm from the array, suitable for MR. The sensor is demonstrated for the in situ detection of moisture within aircraft composites. The paper discusses the design and construction of the magnet array, andpresents results ofsuccessful moisture detection.