The statistics of discovered exoplanets suggest that planets form efficiently. However, there are fundamental unsolved problems, such as excessive inward drift of particles in protoplanetary disks during planet formation. Recent theories invoke dust traps to overcome this problem. We report the detection of a dust trap in the disk around the star Oph IRS 48 using observations from the Atacama Large Millimeter/submillimeter Array (ALMA). The 0.44-millimeter-wavelength continuum map shows high-contrast crescent-shaped emission on one side of the star originating from millimeter-sized grains, whereas both the mid-infrared image (micrometer-sized dust) and the gas traced by the carbon monoxide 6-5 rotational line suggest rings centered on the star. The difference in distribution of big grains versus small grains/gas can be modeled with a vortex-shaped dust trap triggered by a companion.