Attention is thought to operate by enhancing the target of interest and suppressing the surroundings. We hypothesized that the spatial profile of attention depends on the surround's relationship to the target. Using high-density electroencephalographic measurements, we examined the spatial profile of attention to a grating target surrounded by an annular grating that was either coextensive with the target (unsegmented) or appeared segmented from it due to a gap or phase offset. We directly probed the spread of attention from the central target into the surround by flickering the surround and monitoring frequency-tagged steady-state visual-evoked potentials. Observers were required to detect a contrast increment that occurred only on the target. Successful detection of the increment required selecting the target and suppressing the surround, particularly when the target did not readily segment from the surround. The profile of attention was investigated in five visual regions of interest (ROIs) (V1, V4, V3A, lateral occipital complex, and human middle temporal area), mapped in a separate anatomical magnetic resonance imaging scan. We found that in most ROIs, attention to the target generated smaller responses from the surrounding annulus when it was contiguous compared with when it was clearly segmented. This result shows that the profile of attention depends on task demands and on surrounding context; attention is tightly focused when the target region needs to be isolated but loosely focused when the target region is clearly segmented.