The NASA Scatterometer, NSCAT, is an active spaceborne radar designed to measure the normalized radar backscatter coefficient sigma-0 of the ocean surface. These measurements can, in turn, be used to infer the surface vector wind over the ocean using a geophysical model function. Because of the nature of the model function, several ambiguous wind vectors result. A process commonly known as "dealiasing" or ambiguity removal must be used to select the "best" wind vector from the set of ambiguous wind vectors. An automated, median-filter-based ambiguity removal algorithm which requires only the scatterometer measurements will be used by the NSCAT ground data-processing system. The algorithm incorporates a number of selectable parameters such as window size, mode, and likelihood weighting which can be adjusted to optimize algorithm performance. This paper describes the baseline NSCAT ambiguity removal algorithm and the method used to select the set of optimum parameter values. An extensive simulation of the NSCAT instrument and ground data processor provides a means of testing the resulting "turned" algorithm. This simulation generates the ambiguous wind-field vectors expected from the instrument as it orbits over a set of realistic mesoscale wind fields. The ambiguous wind field is then dealiased using the median-filter-based ambiguity removal algorithm. Performance is measured by comparison of the selected wind fields with the "true" wind fields. Results have shown that this median-filter-based ambiguity removal algorithm satisfies NSCAT mission requirements, and it therefore has been incorporated into the baseline geophysical data-processing system for NSCAT.